reab5555 commited on
Commit
edf218a
·
verified ·
1 Parent(s): 7318f8a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +31 -30
app.py CHANGED
@@ -125,36 +125,7 @@ with gr.Blocks() as iface:
125
 
126
  with open('description.txt', 'r') as file:
127
  description_txt = file.read()
128
-
129
- for n in range(3): # Assuming maximum of 3 speakers
130
- with gr.Tab(label=f'Speaker {n + 1}', visible=True):
131
- with gr.TabItem(label=f'General Impression'):
132
- column_components1 = [
133
- gr.Markdown(visible=False),
134
- gr.Textbox(label="General Impression", visible=False)]
135
-
136
- with gr.TabItem(label=f'Attachment Styles'):
137
- column_components2 = [
138
- gr.Plot(visible=False),
139
- gr.Plot(visible=False),
140
- gr.Textbox(label="Attachment Styles Explanation", visible=False)]
141
-
142
- with gr.TabItem(label=f'Big Five Traits'):
143
- column_components3 = [
144
- gr.Plot(visible=False),
145
- gr.Textbox(label="Big Five Traits Explanation", visible=False)]
146
-
147
- with gr.TabItem(label=f'Personalities'):
148
- column_components4 = [
149
- gr.Plot(visible=False),
150
- gr.Textbox(label="Personality Disorders Explanation", visible=False)]
151
-
152
- output_components.extend(column_components1)
153
- output_components.extend(column_components2)
154
- output_components.extend(column_components3)
155
- output_components.extend(column_components4)
156
-
157
-
158
  with gr.Tab(label=f'Description', visible=True):
159
  gr.Markdown(description_txt)
160
  gr.HTML("<div style='height: 20px;'></div>")
@@ -185,6 +156,36 @@ with gr.Blocks() as iface:
185
  example_video_3 = gr.Video(example_video_3_path, label="Example 3", visible=False)
186
  use_example_button_3 = gr.Button("Load Example 3")
187
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
188
  analyze_button.click(
189
  fn=analyze_video,
190
  inputs=[video_input],
 
125
 
126
  with open('description.txt', 'r') as file:
127
  description_txt = file.read()
128
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
  with gr.Tab(label=f'Description', visible=True):
130
  gr.Markdown(description_txt)
131
  gr.HTML("<div style='height: 20px;'></div>")
 
156
  example_video_3 = gr.Video(example_video_3_path, label="Example 3", visible=False)
157
  use_example_button_3 = gr.Button("Load Example 3")
158
 
159
+ for n in range(3): # Assuming maximum of 3 speakers
160
+ with gr.Tab(label=f'Speaker {n + 1}', visible=True):
161
+ with gr.TabItem(label=f'General Impression'):
162
+ column_components1 = [
163
+ gr.Markdown(visible=False),
164
+ gr.Textbox(label="General Impression", visible=False)]
165
+
166
+ with gr.TabItem(label=f'Attachment Styles'):
167
+ column_components2 = [
168
+ gr.Plot(visible=False),
169
+ gr.Plot(visible=False),
170
+ gr.Textbox(label="Attachment Styles Explanation", visible=False)]
171
+
172
+ with gr.TabItem(label=f'Big Five Traits'):
173
+ column_components3 = [
174
+ gr.Plot(visible=False),
175
+ gr.Textbox(label="Big Five Traits Explanation", visible=False)]
176
+
177
+ with gr.TabItem(label=f'Personalities'):
178
+ column_components4 = [
179
+ gr.Plot(visible=False),
180
+ gr.Textbox(label="Personality Disorders Explanation", visible=False)]
181
+
182
+ output_components.extend(column_components1)
183
+ output_components.extend(column_components2)
184
+ output_components.extend(column_components3)
185
+ output_components.extend(column_components4)
186
+
187
+
188
+
189
  analyze_button.click(
190
  fn=analyze_video,
191
  inputs=[video_input],