sidmanale643 commited on
Commit
13e66cb
·
verified ·
1 Parent(s): 7424d37

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -10
app.py CHANGED
@@ -445,17 +445,18 @@ if st.button("Fetch Sentiment Data"):
445
  "audio_text": audio_data,
446
  }
447
 
448
- st.subheader("Company Name")
449
- st.write(output_dict.get("company_name"))
450
-
451
- st.subheader("Final Report")
452
- st.write(output_dict.get("final_report"))
453
-
454
- with st.spinner("Generating audio..."):
455
- audio_data = output_dict["audio_text"]
456
-
457
- if audio_data:
458
  st.audio(audio_data, format="audio/mp3")
 
 
459
 
460
 
461
  except requests.exceptions.RequestException as e:
 
445
  "audio_text": audio_data,
446
  }
447
 
448
+
449
+ if audio_data:
450
+ st.subheader("Company Name")
451
+ st.write(output_dict.get("company_name"))
452
+
453
+ st.subheader("Final Report")
454
+ st.write(output_dict.get("final_report"))
455
+
456
+ with st.spinner("Generating audio..."):
 
457
  st.audio(audio_data, format="audio/mp3")
458
+ else:
459
+ st.error("Failed to generate audio.")
460
 
461
 
462
  except requests.exceptions.RequestException as e: