reab5555 commited on
Commit
2078afe
·
verified ·
1 Parent(s): 3bce9cb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -22
app.py CHANGED
@@ -83,36 +83,33 @@ def update_interface(result):
83
 
84
  return outputs
85
 
86
- custom_css = """
87
- .full-width-plot {
88
- width: 100% !important;
89
- height: 400px !important;
90
- }
91
- """
92
-
93
- with gr.Blocks(css=custom_css) as iface:
94
  gr.Markdown("# AI Personality Detection")
95
  gr.Markdown("Upload a video")
96
 
97
- video_input = gr.Video(label="Upload Video")
98
- max_speakers = gr.Slider(minimum=1, maximum=3, step=1, value=2, label="Maximum Number of Speakers")
99
- analyze_button = gr.Button("Analyze")
100
-
101
- transcript_output = gr.Textbox(label="Transcript", lines=10)
102
- execution_info = gr.Textbox(label="Execution Information")
 
 
 
103
 
104
  with gr.Tabs() as tabs:
105
- speaker_tabs = [gr.Tab(f"# Speaker {i+1}") for i in range(3)]
106
  speaker_outputs = []
107
  for tab in speaker_tabs:
108
  with tab:
109
- attachment_plot = gr.Plot(label="Attachment Styles", elem_classes="full-width-plot")
110
- attachment_explanation = gr.Textbox(label="Attachment Styles Explanation")
111
- dimensions_plot = gr.Plot(label="Attachment Dimensions", elem_classes="full-width-plot")
112
- bigfive_plot = gr.Plot(label="Big Five Traits", elem_classes="full-width-plot")
113
- bigfive_explanation = gr.Textbox(label="Big Five Traits Explanation")
114
- personality_plot = gr.Plot(label="Personality Disorders", elem_classes="full-width-plot")
115
- personality_explanation = gr.Textbox(label="Personality Disorders Explanation")
 
116
  speaker_outputs.extend([
117
  attachment_plot, attachment_explanation, dimensions_plot,
118
  bigfive_plot, bigfive_explanation, personality_plot, personality_explanation
 
83
 
84
  return outputs
85
 
86
+ with gr.Blocks() as iface:
 
 
 
 
 
 
 
87
  gr.Markdown("# AI Personality Detection")
88
  gr.Markdown("Upload a video")
89
 
90
+ with gr.Row():
91
+ with gr.Column(scale=1):
92
+ video_input = gr.Video(label="Upload Video")
93
+ max_speakers = gr.Slider(minimum=1, maximum=3, step=1, value=2, label="Maximum Number of Speakers")
94
+ analyze_button = gr.Button("Analyze")
95
+
96
+ with gr.Column(scale=2):
97
+ transcript_output = gr.Textbox(label="Transcript", lines=10)
98
+ execution_info = gr.Textbox(label="Execution Information")
99
 
100
  with gr.Tabs() as tabs:
101
+ speaker_tabs = [gr.Tab(f"Speaker {i+1}") for i in range(3)]
102
  speaker_outputs = []
103
  for tab in speaker_tabs:
104
  with tab:
105
+ with gr.Column(scale=1):
106
+ attachment_plot = gr.Plot(label="Attachment Styles")
107
+ attachment_explanation = gr.Textbox(label="Attachment Styles Explanation")
108
+ dimensions_plot = gr.Plot(label="Attachment Dimensions")
109
+ bigfive_plot = gr.Plot(label="Big Five Traits")
110
+ bigfive_explanation = gr.Textbox(label="Big Five Traits Explanation")
111
+ personality_plot = gr.Plot(label="Personality Disorders")
112
+ personality_explanation = gr.Textbox(label="Personality Disorders Explanation")
113
  speaker_outputs.extend([
114
  attachment_plot, attachment_explanation, dimensions_plot,
115
  bigfive_plot, bigfive_explanation, personality_plot, personality_explanation