Update app.py
Browse files
app.py
CHANGED
|
@@ -9,7 +9,7 @@ from groq import Groq
|
|
| 9 |
from gtts import gTTS
|
| 10 |
|
| 11 |
# 🚨 Must be the first Streamlit command
|
| 12 |
-
st.set_page_config(page_title="🌍 Climate
|
| 13 |
|
| 14 |
# Load model and Groq client once
|
| 15 |
@st.cache_resource
|
|
@@ -25,7 +25,7 @@ client = load_groq_client()
|
|
| 25 |
|
| 26 |
# UI Header
|
| 27 |
st.markdown(
|
| 28 |
-
"<h1 style='text-align: center; color: #2E8B57;'>🌿 Climate
|
| 29 |
"<p style='text-align: center; font-size: 18px;'>Upload a climate report and ask environment-related questions.</p>",
|
| 30 |
unsafe_allow_html=True
|
| 31 |
)
|
|
@@ -126,7 +126,7 @@ Question:
|
|
| 126 |
f"<div style='background-color:#f0f9f5;padding:15px;border-radius:10px;'>{answer}</div>",
|
| 127 |
unsafe_allow_html=True,
|
| 128 |
)
|
| 129 |
-
|
| 130 |
# Generate and play audio response
|
| 131 |
try:
|
| 132 |
tts = gTTS(text=answer)
|
|
|
|
| 9 |
from gtts import gTTS
|
| 10 |
|
| 11 |
# 🚨 Must be the first Streamlit command
|
| 12 |
+
st.set_page_config(page_title="🌍 Climate Companion", layout="wide")
|
| 13 |
|
| 14 |
# Load model and Groq client once
|
| 15 |
@st.cache_resource
|
|
|
|
| 25 |
|
| 26 |
# UI Header
|
| 27 |
st.markdown(
|
| 28 |
+
"<h1 style='text-align: center; color: #2E8B57;'>🌿 Climate companion</h1>"
|
| 29 |
"<p style='text-align: center; font-size: 18px;'>Upload a climate report and ask environment-related questions.</p>",
|
| 30 |
unsafe_allow_html=True
|
| 31 |
)
|
|
|
|
| 126 |
f"<div style='background-color:#f0f9f5;padding:15px;border-radius:10px;'>{answer}</div>",
|
| 127 |
unsafe_allow_html=True,
|
| 128 |
)
|
| 129 |
+
st.markdown("### ✅ Wanna Hear")
|
| 130 |
# Generate and play audio response
|
| 131 |
try:
|
| 132 |
tts = gTTS(text=answer)
|