sanjeevbora commited on
Commit
d48f3f6
·
verified ·
1 Parent(s): 617e32e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -0
app.py CHANGED
@@ -191,5 +191,13 @@ with gr.Blocks() as interface:
191
 
192
  # Chat handling
193
  submit_btn.click(chat, inputs=[input_box, chat_history], outputs=[chat_history, input_box])
 
 
 
 
 
 
 
 
194
 
195
  interface.launch()
 
191
 
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()