shikharyashmaurya commited on
Commit
26406e6
1 Parent(s): 00cdf6b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -73,7 +73,7 @@ audio_text=st.text_input("What do you want to know about the audio:")
73
 
74
  if audio_text:
75
 
76
- audio_prompt=""".You will be analyse the audio and provide the answers of the question given here: """+text
77
 
78
 
79
  audio_file = st.file_uploader("Upload an audio file", type=["mp3", "wav", "ogg"])
@@ -86,7 +86,7 @@ def generate_gemini_content(prompt,audio_file):
86
 
87
  model = genai.GenerativeModel("models/gemini-1.5-pro-latest")
88
  your_file = genai.upload_file(tmp_file.name)
89
- response = model.generate_content([prompt, your_file])
90
  return response.text
91
 
92
  os.remove(tmp_file.name)
@@ -95,5 +95,5 @@ if st.button("Answer or summary"):
95
 
96
  if audio_file:
97
  summary=generate_gemini_content(prompt,audio_file)
98
- st.markdown("## Summary:")
99
  st.write(summary)
 
73
 
74
  if audio_text:
75
 
76
+ audio_prompt=""".You will be analyse the audio and provide the answers of the question given here: """+audio_text
77
 
78
 
79
  audio_file = st.file_uploader("Upload an audio file", type=["mp3", "wav", "ogg"])
 
86
 
87
  model = genai.GenerativeModel("models/gemini-1.5-pro-latest")
88
  your_file = genai.upload_file(tmp_file.name)
89
+ response = model.generate_content([audio_prompt, your_file])
90
  return response.text
91
 
92
  os.remove(tmp_file.name)
 
95
 
96
  if audio_file:
97
  summary=generate_gemini_content(prompt,audio_file)
98
+ st.markdown("## Emotion/answer:")
99
  st.write(summary)