Update app.py
Browse files
app.py
CHANGED
|
@@ -27,6 +27,12 @@ def main():
|
|
| 27 |
chat_service = ChatService(client, rag_system, tts_service)
|
| 28 |
image_service = ImageService(client)
|
| 29 |
streaming_voice_service = StreamingVoiceService(client, rag_system, tts_service)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 30 |
|
| 31 |
# Create Gradio interface
|
| 32 |
with gr.Blocks(css=create_custom_css(), theme=gr.themes.Soft(primary_hue="orange", neutral_hue="slate")) as demo:
|
|
@@ -39,7 +45,8 @@ def main():
|
|
| 39 |
rag_system=rag_system,
|
| 40 |
tts_service=tts_service,
|
| 41 |
wikipedia_processor=wikipedia_processor,
|
| 42 |
-
streaming_voice_service=streaming_voice_service
|
|
|
|
| 43 |
)
|
| 44 |
|
| 45 |
return demo
|
|
|
|
| 27 |
chat_service = ChatService(client, rag_system, tts_service)
|
| 28 |
image_service = ImageService(client)
|
| 29 |
streaming_voice_service = StreamingVoiceService(client, rag_system, tts_service)
|
| 30 |
+
hybrid_service = HybridStreamingService(
|
| 31 |
+
groq_client=groq_client,
|
| 32 |
+
rag_system=rag_system,
|
| 33 |
+
tts_service=tts_service,
|
| 34 |
+
openai_key=os.getenv("OPENAI_API_KEY")
|
| 35 |
+
)
|
| 36 |
|
| 37 |
# Create Gradio interface
|
| 38 |
with gr.Blocks(css=create_custom_css(), theme=gr.themes.Soft(primary_hue="orange", neutral_hue="slate")) as demo:
|
|
|
|
| 45 |
rag_system=rag_system,
|
| 46 |
tts_service=tts_service,
|
| 47 |
wikipedia_processor=wikipedia_processor,
|
| 48 |
+
streaming_voice_service=streaming_voice_service,
|
| 49 |
+
hybrid_service=hybrid_service
|
| 50 |
)
|
| 51 |
|
| 52 |
return demo
|