Update app.py
Browse files
app.py
CHANGED
|
@@ -1,11 +1,11 @@
|
|
| 1 |
import os
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
-
def
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
"
|
| 8 |
-
|
| 9 |
-
|
| 10 |
|
| 11 |
-
gr.Interface(fn=
|
|
|
|
| 1 |
import os
|
| 2 |
import gradio as gr
|
| 3 |
|
| 4 |
+
def list_files():
|
| 5 |
+
try:
|
| 6 |
+
files = os.listdir("/data")
|
| 7 |
+
return "\n".join(files) if files else "No files found."
|
| 8 |
+
except Exception as e:
|
| 9 |
+
return str(e)
|
| 10 |
|
| 11 |
+
gr.Interface(fn=list_files, inputs=None, outputs="text").launch()
|