file debug
Browse files- src/streamlit_app.py +7 -1
src/streamlit_app.py
CHANGED
|
@@ -67,8 +67,14 @@ import streamlit as st
|
|
| 67 |
|
| 68 |
uploaded_file = st.file_uploader("Upload your file", type=["txt","pdf"])
|
| 69 |
if uploaded_file is not None:
|
|
|
|
| 70 |
data = uploaded_file.read()
|
| 71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 72 |
query = st.text_input("Ask a question:")
|
| 73 |
|
| 74 |
# if uploaded_file is not None:
|
|
|
|
| 67 |
|
| 68 |
uploaded_file = st.file_uploader("Upload your file", type=["txt","pdf"])
|
| 69 |
if uploaded_file is not None:
|
| 70 |
+
st.write("Filename:", uploaded_file.name)
|
| 71 |
data = uploaded_file.read()
|
| 72 |
+
|
| 73 |
+
if uploaded_file.type == "text/plain":
|
| 74 |
+
st.text_area("Content", data.decode("utf-8"), height=300)
|
| 75 |
+
else:
|
| 76 |
+
st.info(f"Uploaded {len(data)} bytes (PDF or other format)")
|
| 77 |
+
|
| 78 |
query = st.text_input("Ask a question:")
|
| 79 |
|
| 80 |
# if uploaded_file is not None:
|