Spaces:
Running
Running
A newer version of the Gradio SDK is available:
6.1.0
metadata
title: Newpress Ai
emoji: π
colorFrom: indigo
colorTo: purple
sdk: gradio
sdk_version: 6.0.1
app_file: app.py
pinned: false
short_description: An AI for Newpress
NewPress AI - Johnny Harris Script Assistant
Use Johnny's archive of hundreds of video transcripts to:
- Search if a topic has been covered before
- Generate scripts in Johnny's voice from your notes
Dependency Notes
Gradio + Supabase Compatibility
There's a dependency conflict between older Gradio versions and Supabase:
- supabase >= 2.0 requires
realtimewhich needswebsockets >= 13.0 - gradio 4.x pins
websocketsto 12.x viagradio_client - gradio >= 5.0 supports
websockets >= 13.0
Solution: Use gradio >= 5.0.0 in requirements.txt
Gradio 6.x API Changes
In Gradio 6.0, the theme parameter moved from gr.Blocks() to .launch():
# Old (Gradio 4.x)
with gr.Blocks(theme=gr.themes.Soft()) as app:
...
# New (Gradio 6.x)
with gr.Blocks() as app:
...
app.launch(theme="soft")
Progress Indicators
For progress bars and spinners to work in Gradio, functions must be generators that yield intermediate results:
# Won't show progress (regular function)
def search(query, progress=gr.Progress()):
progress(0.5, desc="Searching...")
return results # No UI updates until complete
# Will show progress (generator)
def search(query, progress=gr.Progress()):
progress(0.5, desc="Searching...")
yield "Searching..." # UI updates here
yield results # Final result
The yield statements create checkpoints where Gradio can update the UI.