Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -13,13 +13,6 @@ 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"
|
@@ -95,10 +88,10 @@ agent = CodeAgent(
|
|
95 |
)
|
96 |
|
97 |
# Gradio interface with text and audio output
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
|
103 |
|
104 |
|
|
|
13 |
from tools.visit_webpage import VisitWebpageTool
|
14 |
|
15 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
16 |
|
17 |
# Define the audio output path
|
18 |
AUDIO_OUTPUT_PATH = "/tmp/response.mp3"
|
|
|
88 |
)
|
89 |
|
90 |
# Gradio interface with text and audio output
|
91 |
+
def gradio_search_jokes(word):
|
92 |
+
"""Wrapper function for Gradio to call search_dad_jokes and generate audio."""
|
93 |
+
response_text, audio_file = search_dad_jokes(word) # Ensure search_dad_jokes returns (text, file path)
|
94 |
+
return response_text, audio_file
|
95 |
|
96 |
|
97 |
|