Spaces:
Sleeping
Sleeping
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +11 -11
src/streamlit_app.py
CHANGED
|
@@ -28,17 +28,17 @@ if uploaded_file is not None:
|
|
| 28 |
st.success(f"{uploaded_file.name} uploaded successfully!")
|
| 29 |
|
| 30 |
# Chat Section
|
| 31 |
-
st.header("💬 Ask a Question")
|
| 32 |
-
query = st.text_input("Your question:")
|
| 33 |
-
if st.button("Submit"):
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
|
| 40 |
-
|
| 41 |
-
|
| 42 |
|
| 43 |
# Chat Section
|
| 44 |
st.header("💬 Ask a CAM Question")
|
|
|
|
| 28 |
st.success(f"{uploaded_file.name} uploaded successfully!")
|
| 29 |
|
| 30 |
# Chat Section
|
| 31 |
+
# st.header("💬 Ask a Question")
|
| 32 |
+
# query = st.text_input("Your question:")
|
| 33 |
+
# if st.button("Submit"):
|
| 34 |
+
# if query:
|
| 35 |
+
# with st.spinner("Thinking..."):
|
| 36 |
+
# res = requests.post(API_CHAT_URL, json={
|
| 37 |
+
# "query": query, "top_k": 3})
|
| 38 |
+
# if res.status_code == 200:
|
| 39 |
+
# st.success(res.json().get("answer", "No response."))
|
| 40 |
+
# else:
|
| 41 |
+
# st.error(f"Error: {res.text}")
|
| 42 |
|
| 43 |
# Chat Section
|
| 44 |
st.header("💬 Ask a CAM Question")
|