Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -16,6 +16,7 @@ from pathlib import Path
|
|
16 |
from fastapi import FastAPI, UploadFile, File, Form, HTTPException
|
17 |
from fastapi.responses import JSONResponse
|
18 |
from fastapi.middleware.cors import CORSMiddleware
|
|
|
19 |
|
20 |
|
21 |
def wrap_text(text, max_line_length=29):
|
@@ -587,7 +588,7 @@ def main():
|
|
587 |
interface = create_interface()
|
588 |
|
589 |
# Mount FastAPI on Gradio
|
590 |
-
|
591 |
|
592 |
print("π Starting Gradio UI on http://localhost:7860")
|
593 |
print("π§ FastAPI API endpoint available at http://localhost:7860/api/align")
|
|
|
16 |
from fastapi import FastAPI, UploadFile, File, Form, HTTPException
|
17 |
from fastapi.responses import JSONResponse
|
18 |
from fastapi.middleware.cors import CORSMiddleware
|
19 |
+
from gradio.routes import mount_gradio_app
|
20 |
|
21 |
|
22 |
def wrap_text(text, max_line_length=29):
|
|
|
588 |
interface = create_interface()
|
589 |
|
590 |
# Mount FastAPI on Gradio
|
591 |
+
mount_gradio_app(fastapi_app, path="/api")
|
592 |
|
593 |
print("π Starting Gradio UI on http://localhost:7860")
|
594 |
print("π§ FastAPI API endpoint available at http://localhost:7860/api/align")
|