Spaces:
Runtime error
Runtime error
with gr.Blocks() as app: | |
gr.Markdown("# 🧠 Emotion Decoder: Text | Face | Video") | |
gr.Markdown("Upload Text, Face Image, or Video to Analyze Emotional Tone!") | |
with gr.Tab("Text Post Analysis"): | |
text_input = gr.Textbox(label="Paste Social Media Text Here") | |
text_output = gr.Textbox(label="Analysis Result") | |
text_btn = gr.Button("Analyze Text") | |
text_btn.click(analyze_text, inputs=text_input, outputs=text_output) | |
with gr.Tab("Face Emotion Analysis"): | |
face_input = gr.Image(type="filepath", label="Upload Face Image") | |
face_output = gr.Textbox(label="Face Emotion Result") | |
face_btn = gr.Button("Analyze Face") | |
face_btn.click(analyze_face, inputs=face_input, outputs=face_output) | |
with gr.Tab("Video Analysis"): | |
video_input = gr.Video(label="Upload Social Media Video") | |
video_output = gr.Textbox(label="Video Sentiment & Emotion Result") | |
video_btn = gr.Button("Analyze Video") | |
video_btn.click(analyze_video, inputs=video_input, outputs=video_output) | |
app.launch(share=True) | |