Skip to content

Commit

Permalink
add caching
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrielchua committed Sep 30, 2024
1 parent 410bed3 commit 8bc56b2
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions app.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# Third-party imports
import gradio as gr
from loguru import logger
from openai import OpenAI
from pydantic import BaseModel
from pypdf import PdfReader
from pydub import AudioSegment
Expand Down Expand Up @@ -185,7 +184,25 @@ def generate_podcast(
allow_flagging="never",
api_name="generate_podcast",
theme=gr.themes.Soft(),
concurrency_limit=3
concurrency_limit=3,
examples=[
[
[str(Path("examples/1310.4546v1.pdf"))],
"",
"Fun",
"Short (1-2 min)",
"English"
],
[
[],
"https://en.wikipedia.org/wiki/Hugging_Face",
"Fun",
"Short (1-2 min)",
"English"
],
],
cache_examples=True,
examples_cache_dir="examples_cached"
)

if __name__ == "__main__":
Expand Down
Binary file added examples/1310.4546v1.pdf
Binary file not shown.
Empty file added examples_cached/.gitkeep
Empty file.

0 comments on commit 8bc56b2

Please sign in to comment.