Spaces:
Sleeping
Sleeping
NyanSwanAung23
commited on
Commit
·
02f8159
1
Parent(s):
944dc5f
fix vid save paths to tmp/gradio
Browse files- classifier.py +4 -2
- main.py +0 -13
classifier.py
CHANGED
@@ -20,8 +20,10 @@ class Classifier:
|
|
20 |
3: "Happy", 4: "Neutral", 5: "Sad", 6: "Surprised"}
|
21 |
|
22 |
self.input_path = input_path
|
23 |
-
self.output_path = "result/" + self.input_path.split('/')[-1]
|
24 |
-
os.makedirs("result", exist_ok=True)
|
|
|
|
|
25 |
|
26 |
print("Models have been loaded")
|
27 |
# def get_model(self):
|
|
|
20 |
3: "Happy", 4: "Neutral", 5: "Sad", 6: "Surprised"}
|
21 |
|
22 |
self.input_path = input_path
|
23 |
+
self.output_path = "/tmp/gradio/result/" + self.input_path.split('/')[-1]
|
24 |
+
os.makedirs("/tmp/gradio/result", exist_ok=True)
|
25 |
+
is_dir = os.path.exists("/tmp/gradio/result")
|
26 |
+
print("Is there dir? :", is_dir)
|
27 |
|
28 |
print("Models have been loaded")
|
29 |
# def get_model(self):
|
main.py
DELETED
@@ -1,13 +0,0 @@
|
|
1 |
-
from fastapi import FastAPI
|
2 |
-
import gradio as gr
|
3 |
-
from app import demo
|
4 |
-
|
5 |
-
|
6 |
-
app = FastAPI()
|
7 |
-
|
8 |
-
|
9 |
-
@app.get('/')
|
10 |
-
async def root():
|
11 |
-
return "Gradio app is running at /gradio", 200
|
12 |
-
|
13 |
-
app = gr.mount_gradio_app(app, demo, path='/gradio')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|