Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -237,7 +237,11 @@ def extract_speaker_data(text):
|
|
237 |
speakers[current_speaker] = {}
|
238 |
elif current_speaker and ":" in line:
|
239 |
key, value = line.split(":", 1)
|
240 |
-
|
|
|
|
|
|
|
|
|
241 |
return speakers
|
242 |
|
243 |
def create_bar_chart(data, title, speaker):
|
@@ -298,10 +302,10 @@ def create_interface():
|
|
298 |
input_file.upload(
|
299 |
fn=process_input,
|
300 |
inputs=[input_file],
|
301 |
-
outputs=[progress_text, execution_time, detected_language, input_info,
|
302 |
).then(
|
303 |
fn=update_visibility_and_charts,
|
304 |
-
inputs=[progress_text, execution_time, detected_language, input_info,
|
305 |
outputs=[progress_text, execution_time, detected_language, input_info, *charts]
|
306 |
)
|
307 |
|
|
|
237 |
speakers[current_speaker] = {}
|
238 |
elif current_speaker and ":" in line:
|
239 |
key, value = line.split(":", 1)
|
240 |
+
try:
|
241 |
+
speakers[current_speaker][key.strip()] = float(value.strip())
|
242 |
+
except ValueError:
|
243 |
+
# Skip if the value is not a number
|
244 |
+
pass
|
245 |
return speakers
|
246 |
|
247 |
def create_bar_chart(data, title, speaker):
|
|
|
302 |
input_file.upload(
|
303 |
fn=process_input,
|
304 |
inputs=[input_file],
|
305 |
+
outputs=[progress_text, execution_time, detected_language, input_info, attachments_output, bigfive_output, personalities_output]
|
306 |
).then(
|
307 |
fn=update_visibility_and_charts,
|
308 |
+
inputs=[progress_text, execution_time, detected_language, input_info, attachments_output, bigfive_output, personalities_output],
|
309 |
outputs=[progress_text, execution_time, detected_language, input_info, *charts]
|
310 |
)
|
311 |
|