Spaces:
Runtime error
Runtime error
Update entry_with_update.py
Browse files- entry_with_update.py +9 -15
entry_with_update.py
CHANGED
|
@@ -1,17 +1,11 @@
|
|
| 1 |
-
import
|
| 2 |
-
import
|
| 3 |
-
import subprocess
|
| 4 |
|
| 5 |
-
|
| 6 |
-
try:
|
| 7 |
-
subprocess.check_call(["git", "pull"])
|
| 8 |
-
print("Repository updated successfully.")
|
| 9 |
-
except subprocess.CalledProcessError:
|
| 10 |
-
print("Failed to update repository.")
|
| 11 |
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from fastapi import FastAPI
|
|
|
|
| 3 |
|
| 4 |
+
app = FastAPI()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
|
| 6 |
+
@app.get("/")
|
| 7 |
+
def read_main():
|
| 8 |
+
return {"message": "This is your FastAPI app"}
|
| 9 |
+
|
| 10 |
+
import main
|
| 11 |
+
gr.mount_gradio_app(app, main.demo, path="/")
|