Update app.py
Browse files
app.py
CHANGED
@@ -1,6 +1,4 @@
|
|
1 |
import os
|
2 |
-
os.environ["MPLCONFIGDIR"] = "/tmp/matplotlib" # Suppress Matplotlib warning
|
3 |
-
|
4 |
from flask import Flask, send_from_directory
|
5 |
from flask_cors import CORS
|
6 |
import gradio as gr
|
@@ -24,8 +22,8 @@ def serve_static(path):
|
|
24 |
return send_from_directory("/app/mario", path)
|
25 |
|
26 |
# Debug route to list files
|
27 |
-
@flask_app.route("/mario/
|
28 |
-
def
|
29 |
import os
|
30 |
files = os.listdir("/app/mario")
|
31 |
return {"files": files}
|
|
|
1 |
import os
|
|
|
|
|
2 |
from flask import Flask, send_from_directory
|
3 |
from flask_cors import CORS
|
4 |
import gradio as gr
|
|
|
22 |
return send_from_directory("/app/mario", path)
|
23 |
|
24 |
# Debug route to list files
|
25 |
+
@flask_app.route("/mario/files")
|
26 |
+
def list_files():
|
27 |
import os
|
28 |
files = os.listdir("/app/mario")
|
29 |
return {"files": files}
|