Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -13,8 +13,7 @@ def saveFile(file):
|
|
| 13 |
return f"https://astraos-nx-storage.hf.space/file=./{file_infor['path']}"
|
| 14 |
|
| 15 |
|
| 16 |
-
|
| 17 |
-
nxapp.launch()
|
| 18 |
|
| 19 |
import gradio as gr
|
| 20 |
import os
|
|
@@ -50,6 +49,7 @@ for directory in ["/home/user/app", "/data"]:
|
|
| 50 |
##############################################################
|
| 51 |
|
| 52 |
with gr.Blocks() as demo:
|
|
|
|
| 53 |
gr.FileExplorer(label="Working directory")
|
| 54 |
gr.FileExplorer(root="/home/user/app", label="Persistent storage")
|
| 55 |
|
|
|
|
| 13 |
return f"https://astraos-nx-storage.hf.space/file=./{file_infor['path']}"
|
| 14 |
|
| 15 |
|
| 16 |
+
|
|
|
|
| 17 |
|
| 18 |
import gradio as gr
|
| 19 |
import os
|
|
|
|
| 49 |
##############################################################
|
| 50 |
|
| 51 |
with gr.Blocks() as demo:
|
| 52 |
+
gr.Interface(fn=saveFile, inputs="file", outputs="text")
|
| 53 |
gr.FileExplorer(label="Working directory")
|
| 54 |
gr.FileExplorer(root="/home/user/app", label="Persistent storage")
|
| 55 |
|