Singularity666 commited on
Commit
31e414a
Β·
verified Β·
1 Parent(s): 22b0aff

Update entry_with_update.py

Browse files
Files changed (1) hide show
  1. entry_with_update.py +9 -15
entry_with_update.py CHANGED
@@ -1,17 +1,11 @@
1
- import os
2
- import sys
3
- import subprocess
4
 
5
- def update_repo():
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
- if __name__ == "__main__":
13
- update_repo()
14
-
15
- # Run the main script
16
- main_script = os.path.join(os.path.dirname(__file__), "launch.py")
17
- sys.exit(subprocess.call([sys.executable, main_script] + sys.argv[1:]))
 
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="/")