Spaces:
Running
on
T4
Running
on
T4
gabrielchua
commited on
Commit
•
0d18445
1
Parent(s):
ab47d81
remove FastAPI
Browse files
app.py
CHANGED
@@ -12,8 +12,6 @@ from typing import List, Literal, Tuple
|
|
12 |
|
13 |
# Third-party imports
|
14 |
import gradio as gr
|
15 |
-
from fastapi import FastAPI
|
16 |
-
from fastapi.staticfiles import StaticFiles
|
17 |
from loguru import logger
|
18 |
from pydantic import BaseModel
|
19 |
from pypdf import PdfReader
|
@@ -23,11 +21,6 @@ from pydub import AudioSegment
|
|
23 |
from prompts import SYSTEM_PROMPT
|
24 |
from utils import generate_script, generate_audio
|
25 |
|
26 |
-
app = FastAPI()
|
27 |
-
|
28 |
-
app.mount("/static", StaticFiles(directory="static"), name="static")
|
29 |
-
|
30 |
-
|
31 |
class DialogueItem(BaseModel):
|
32 |
"""A single dialogue item."""
|
33 |
|
@@ -112,7 +105,5 @@ demo = gr.Interface(
|
|
112 |
api_name=False,
|
113 |
)
|
114 |
|
115 |
-
app = gr.mount_gradio_app(app, demo, path="/")
|
116 |
-
|
117 |
if __name__ == "__main__":
|
118 |
demo.launch(show_api=False)
|
|
|
12 |
|
13 |
# Third-party imports
|
14 |
import gradio as gr
|
|
|
|
|
15 |
from loguru import logger
|
16 |
from pydantic import BaseModel
|
17 |
from pypdf import PdfReader
|
|
|
21 |
from prompts import SYSTEM_PROMPT
|
22 |
from utils import generate_script, generate_audio
|
23 |
|
|
|
|
|
|
|
|
|
|
|
24 |
class DialogueItem(BaseModel):
|
25 |
"""A single dialogue item."""
|
26 |
|
|
|
105 |
api_name=False,
|
106 |
)
|
107 |
|
|
|
|
|
108 |
if __name__ == "__main__":
|
109 |
demo.launch(show_api=False)
|