Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -12,6 +12,11 @@ import streamlit as st
|
|
| 12 |
|
| 13 |
st.title("Drop files onto the chat input field")
|
| 14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
# Create a chat input field with file upload capabilities
|
| 16 |
chat_input = st.chat_input(
|
| 17 |
placeholder="Type your message or drop a file...",
|
|
@@ -20,9 +25,6 @@ chat_input = st.chat_input(
|
|
| 20 |
on_submit=handle_file_drop
|
| 21 |
)
|
| 22 |
|
| 23 |
-
def handle_file_drop(files):
|
| 24 |
-
# Do something with the dropped files (e.g., process them, store them, etc.)
|
| 25 |
-
print(f"Dropped files: {files}")
|
| 26 |
|
| 27 |
#if __name__ == "__main__":
|
| 28 |
# st.launch(function_name="app")
|
|
|
|
| 12 |
|
| 13 |
st.title("Drop files onto the chat input field")
|
| 14 |
|
| 15 |
+
|
| 16 |
+
def handle_file_drop(files):
|
| 17 |
+
# Do something with the dropped files (e.g., process them, store them, etc.)
|
| 18 |
+
print(f"Dropped files: {files}")
|
| 19 |
+
|
| 20 |
# Create a chat input field with file upload capabilities
|
| 21 |
chat_input = st.chat_input(
|
| 22 |
placeholder="Type your message or drop a file...",
|
|
|
|
| 25 |
on_submit=handle_file_drop
|
| 26 |
)
|
| 27 |
|
|
|
|
|
|
|
|
|
|
| 28 |
|
| 29 |
#if __name__ == "__main__":
|
| 30 |
# st.launch(function_name="app")
|