marks
commited on
Commit
·
8c7facc
1
Parent(s):
5f41e8a
Short circuited config
Browse files
app.py
CHANGED
|
@@ -1,10 +1,6 @@
|
|
| 1 |
import asyncio
|
| 2 |
import os
|
| 3 |
import gradio as gr
|
| 4 |
-
from typing import Optional
|
| 5 |
-
from scraper import scrape_url
|
| 6 |
-
from podcast_generator import PodcastGenerator
|
| 7 |
-
from tts import text_to_speech
|
| 8 |
from api_clients import OpenRouterClient, ElevenLabsClient
|
| 9 |
from logger import setup_logger
|
| 10 |
from config import Config
|
|
@@ -18,8 +14,8 @@ default_models = [("", "Enter API key to load models")]
|
|
| 18 |
class PodcasterUI:
|
| 19 |
def __init__(self, config: Config):
|
| 20 |
self.config = config
|
| 21 |
-
self.router_client = OpenRouterClient(
|
| 22 |
-
self.elevenlabs_client = ElevenLabsClient(
|
| 23 |
# Store models and voices as instance variables
|
| 24 |
self.models = []
|
| 25 |
self.voices = []
|
|
|
|
| 1 |
import asyncio
|
| 2 |
import os
|
| 3 |
import gradio as gr
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
from api_clients import OpenRouterClient, ElevenLabsClient
|
| 5 |
from logger import setup_logger
|
| 6 |
from config import Config
|
|
|
|
| 14 |
class PodcasterUI:
|
| 15 |
def __init__(self, config: Config):
|
| 16 |
self.config = config
|
| 17 |
+
self.router_client = OpenRouterClient(os.getenv('OPENROUTER_API_KEY', ''))
|
| 18 |
+
self.elevenlabs_client = ElevenLabsClient(os.getenv('ELEVENLABS_API_KEY', ''))
|
| 19 |
# Store models and voices as instance variables
|
| 20 |
self.models = []
|
| 21 |
self.voices = []
|