Delete app.py
Browse files
app.py
DELETED
|
@@ -1,24 +0,0 @@
|
|
| 1 |
-
from pathlib import Path
|
| 2 |
-
|
| 3 |
-
import gradio as gr
|
| 4 |
-
from fastapi.responses import FileResponse
|
| 5 |
-
from fastapi.staticfiles import StaticFiles
|
| 6 |
-
|
| 7 |
-
DIST = Path(__file__).resolve().parent / 'dist'
|
| 8 |
-
app = gr.Server()
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
@app.get('/api/health')
|
| 12 |
-
def health():
|
| 13 |
-
return {'status': 'ok'}
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
@app.get('/')
|
| 17 |
-
def index():
|
| 18 |
-
return FileResponse(DIST / 'index.html')
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
app.mount('/assets', StaticFiles(directory=DIST / 'assets'), name='assets')
|
| 22 |
-
|
| 23 |
-
if __name__ == '__main__':
|
| 24 |
-
app.launch(server_name='0.0.0.0')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|