Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -12,6 +12,15 @@ from Gradio_UI import GradioUI
|
|
12 |
from tools.web_search import DuckDuckGoSearchTool
|
13 |
from tools.visit_webpage import VisitWebpageTool
|
14 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
15 |
# Define the audio output path
|
16 |
AUDIO_OUTPUT_PATH = "/tmp/response.mp3"
|
17 |
|
|
|
12 |
from tools.web_search import DuckDuckGoSearchTool
|
13 |
from tools.visit_webpage import VisitWebpageTool
|
14 |
|
15 |
+
|
16 |
+
# Gradio interface with text and audio output
|
17 |
+
def gradio_search_jokes(word):
|
18 |
+
"""Wrapper function for Gradio to call search_dad_jokes and generate audio."""
|
19 |
+
response_text, audio_file = search_dad_jokes(word) # Ensure search_dad_jokes returns (text, file path)
|
20 |
+
return response_text, audio_file
|
21 |
+
|
22 |
+
|
23 |
+
|
24 |
# Define the audio output path
|
25 |
AUDIO_OUTPUT_PATH = "/tmp/response.mp3"
|
26 |
|