Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +6 -6
src/streamlit_app.py
CHANGED
@@ -3,16 +3,16 @@ from PIL import Image
|
|
3 |
import wikipedia
|
4 |
import csv
|
5 |
from datetime import datetime
|
6 |
-
import tempfile
|
7 |
import os
|
8 |
|
9 |
# ====== Setup ======
|
10 |
USERS = {}
|
11 |
|
12 |
-
UPLOAD_FOLDER =
|
13 |
MEDIA_FOLDER = os.path.join(UPLOAD_FOLDER, "feedback_media")
|
14 |
FEEDBACK_FILE = os.path.join(UPLOAD_FOLDER, "feedback.csv")
|
15 |
|
|
|
16 |
os.makedirs(MEDIA_FOLDER, exist_ok=True)
|
17 |
|
18 |
STATES = {
|
@@ -134,7 +134,7 @@ def main_app():
|
|
134 |
logout()
|
135 |
st.experimental_rerun()
|
136 |
|
137 |
-
# Feedback inputs
|
138 |
st.sidebar.markdown("---")
|
139 |
st.sidebar.subheader("π Give Feedback")
|
140 |
feedback_text = st.sidebar.text_area("Your thoughts about this place", height=100)
|
@@ -143,9 +143,9 @@ def main_app():
|
|
143 |
feedback_video = st.sidebar.file_uploader("Upload video", type=["mp4", "mov", "avi"])
|
144 |
|
145 |
if feedback_image:
|
146 |
-
st.sidebar.image(feedback_image, caption="
|
147 |
if feedback_audio:
|
148 |
-
st.sidebar.audio(feedback_audio
|
149 |
if feedback_video:
|
150 |
st.sidebar.video(feedback_video)
|
151 |
|
@@ -211,7 +211,6 @@ def main_app():
|
|
211 |
|
212 |
# ====== UI Styling ======
|
213 |
st.set_page_config(page_title="Gyana Vedika", layout="wide")
|
214 |
-
|
215 |
st.markdown("""
|
216 |
<style>
|
217 |
.stButton>button {
|
@@ -226,6 +225,7 @@ h1, h2, h3, h4, h5, h6 {
|
|
226 |
</style>
|
227 |
""", unsafe_allow_html=True)
|
228 |
|
|
|
229 |
if not st.session_state.logged_in:
|
230 |
page = st.sidebar.radio("Choose Option", ["Signup", "Login"])
|
231 |
if page == "Signup":
|
|
|
3 |
import wikipedia
|
4 |
import csv
|
5 |
from datetime import datetime
|
|
|
6 |
import os
|
7 |
|
8 |
# ====== Setup ======
|
9 |
USERS = {}
|
10 |
|
11 |
+
UPLOAD_FOLDER = "uploads"
|
12 |
MEDIA_FOLDER = os.path.join(UPLOAD_FOLDER, "feedback_media")
|
13 |
FEEDBACK_FILE = os.path.join(UPLOAD_FOLDER, "feedback.csv")
|
14 |
|
15 |
+
# Create folders if they don't exist
|
16 |
os.makedirs(MEDIA_FOLDER, exist_ok=True)
|
17 |
|
18 |
STATES = {
|
|
|
134 |
logout()
|
135 |
st.experimental_rerun()
|
136 |
|
137 |
+
# Feedback inputs
|
138 |
st.sidebar.markdown("---")
|
139 |
st.sidebar.subheader("π Give Feedback")
|
140 |
feedback_text = st.sidebar.text_area("Your thoughts about this place", height=100)
|
|
|
143 |
feedback_video = st.sidebar.file_uploader("Upload video", type=["mp4", "mov", "avi"])
|
144 |
|
145 |
if feedback_image:
|
146 |
+
st.sidebar.image(feedback_image, caption="Uploaded image", use_container_width=True)
|
147 |
if feedback_audio:
|
148 |
+
st.sidebar.audio(feedback_audio)
|
149 |
if feedback_video:
|
150 |
st.sidebar.video(feedback_video)
|
151 |
|
|
|
211 |
|
212 |
# ====== UI Styling ======
|
213 |
st.set_page_config(page_title="Gyana Vedika", layout="wide")
|
|
|
214 |
st.markdown("""
|
215 |
<style>
|
216 |
.stButton>button {
|
|
|
225 |
</style>
|
226 |
""", unsafe_allow_html=True)
|
227 |
|
228 |
+
# ====== Main Control ======
|
229 |
if not st.session_state.logged_in:
|
230 |
page = st.sidebar.radio("Choose Option", ["Signup", "Login"])
|
231 |
if page == "Signup":
|