Spaces:
Configuration error
Configuration error
gabrielchua
commited on
Commit
•
ef28f77
1
Parent(s):
dc06293
add caching
Browse files- app.py +19 -2
- examples/1310.4546v1.pdf +0 -0
- examples_cached/.gitkeep +0 -0
app.py
CHANGED
@@ -13,7 +13,6 @@ from typing import List, Literal, Tuple, Optional
|
|
13 |
# Third-party imports
|
14 |
import gradio as gr
|
15 |
from loguru import logger
|
16 |
-
from openai import OpenAI
|
17 |
from pydantic import BaseModel
|
18 |
from pypdf import PdfReader
|
19 |
from pydub import AudioSegment
|
@@ -185,7 +184,25 @@ demo = gr.Interface(
|
|
185 |
allow_flagging="never",
|
186 |
api_name="generate_podcast",
|
187 |
theme=gr.themes.Soft(),
|
188 |
-
concurrency_limit=3
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
189 |
)
|
190 |
|
191 |
if __name__ == "__main__":
|
|
|
13 |
# Third-party imports
|
14 |
import gradio as gr
|
15 |
from loguru import logger
|
|
|
16 |
from pydantic import BaseModel
|
17 |
from pypdf import PdfReader
|
18 |
from pydub import AudioSegment
|
|
|
184 |
allow_flagging="never",
|
185 |
api_name="generate_podcast",
|
186 |
theme=gr.themes.Soft(),
|
187 |
+
concurrency_limit=3,
|
188 |
+
examples=[
|
189 |
+
[
|
190 |
+
[str(Path("examples/1310.4546v1.pdf"))],
|
191 |
+
"",
|
192 |
+
"Fun",
|
193 |
+
"Short (1-2 min)",
|
194 |
+
"English"
|
195 |
+
],
|
196 |
+
[
|
197 |
+
[],
|
198 |
+
"https://en.wikipedia.org/wiki/Hugging_Face",
|
199 |
+
"Fun",
|
200 |
+
"Short (1-2 min)",
|
201 |
+
"English"
|
202 |
+
],
|
203 |
+
],
|
204 |
+
cache_examples=True,
|
205 |
+
examples_cache_dir="examples_cached"
|
206 |
)
|
207 |
|
208 |
if __name__ == "__main__":
|
examples/1310.4546v1.pdf
ADDED
Binary file (125 kB). View file
|
|
examples_cached/.gitkeep
ADDED
File without changes
|