Update app.py
Browse files
app.py
CHANGED
@@ -96,7 +96,8 @@ if openai_api_key:
|
|
96 |
"Mathematics Assistant", # Added option for Math
|
97 |
"Biology Assistant", # Added option for Biology
|
98 |
"Chemistry Assistant", # Added option for Chemistry
|
99 |
-
"Physics Assistant" # Added option for Physics
|
|
|
100 |
))
|
101 |
|
102 |
if mode == "Course Query Assistant":
|
@@ -380,3 +381,15 @@ if openai_api_key:
|
|
380 |
)
|
381 |
answer = response['choices'][0]['message']['content']
|
382 |
st.write(f"### Answer: {answer}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
96 |
"Mathematics Assistant", # Added option for Math
|
97 |
"Biology Assistant", # Added option for Biology
|
98 |
"Chemistry Assistant", # Added option for Chemistry
|
99 |
+
"Physics Assistant", # Added option for Physics
|
100 |
+
"Voice Chat"
|
101 |
))
|
102 |
|
103 |
if mode == "Course Query Assistant":
|
|
|
381 |
)
|
382 |
answer = response['choices'][0]['message']['content']
|
383 |
st.write(f"### Answer: {answer}")
|
384 |
+
|
385 |
+
# **New Section: Voice Chat**
|
386 |
+
elif mode == "Voice Chat":
|
387 |
+
st.header("Voice Chat")
|
388 |
+
|
389 |
+
# Display a description or instructions
|
390 |
+
st.write("Click the button below to go to the Voice Chat.")
|
391 |
+
|
392 |
+
# Button to navigate to the external voice chat link
|
393 |
+
if st.button("Go to Voice Chat"):
|
394 |
+
st.write("Redirecting to the voice chat...") # You can customize this message
|
395 |
+
st.markdown(f'<a href="https://shukdevdatta123-voicechat.hf.space" target="_blank">Go to Voice Chat</a>', unsafe_allow_html=True)
|