Spaces:
Paused
Paused
Update app.py
Browse files
app.py
CHANGED
|
@@ -192,12 +192,12 @@ with gr.Blocks() as interface:
|
|
| 192 |
# Chat handling
|
| 193 |
submit_btn.click(chat, inputs=[input_box, chat_history], outputs=[chat_history, input_box])
|
| 194 |
def list_files_in_folder():
|
| 195 |
-
|
| 196 |
-
|
| 197 |
-
|
| 198 |
|
| 199 |
iface = gr.Interface(fn=list_files_in_folder, inputs=[], outputs="json")
|
| 200 |
-
|
| 201 |
|
| 202 |
|
| 203 |
interface.launch()
|
|
|
|
| 192 |
# Chat handling
|
| 193 |
submit_btn.click(chat, inputs=[input_box, chat_history], outputs=[chat_history, input_box])
|
| 194 |
def list_files_in_folder():
|
| 195 |
+
folder_path = "example/" # The folder with your files
|
| 196 |
+
files = os.listdir(folder_path)
|
| 197 |
+
return files # This should be a list of filenames
|
| 198 |
|
| 199 |
iface = gr.Interface(fn=list_files_in_folder, inputs=[], outputs="json")
|
| 200 |
+
iface.launch()
|
| 201 |
|
| 202 |
|
| 203 |
interface.launch()
|