Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -10,21 +10,7 @@ from tools.stock_agent import StockChartTool
|
|
10 |
from Gradio_UI import GradioUI
|
11 |
|
12 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
13 |
-
@tool
|
14 |
-
@tool
|
15 |
-
def text_to_speech(text: str) -> str:
|
16 |
-
"""Converts the given text to speech and returns a success message.
|
17 |
|
18 |
-
Args:
|
19 |
-
text: The text to be converted to speech.
|
20 |
-
"""
|
21 |
-
try:
|
22 |
-
engine = pyttsx3.init() # Initialize the speech engine
|
23 |
-
engine.say(text) # Speak the text
|
24 |
-
engine.runAndWait() # Wait for the speech to complete
|
25 |
-
return "Text successfully converted to speech."
|
26 |
-
except Exception as e:
|
27 |
-
return f"Error converting text to speech: {str(e)}"
|
28 |
|
29 |
@tool
|
30 |
def get_current_time_in_timezone(timezone: str) -> str:
|
|
|
10 |
from Gradio_UI import GradioUI
|
11 |
|
12 |
# Below is an example of a tool that does nothing. Amaze us with your creativity !
|
|
|
|
|
|
|
|
|
13 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
|
15 |
@tool
|
16 |
def get_current_time_in_timezone(timezone: str) -> str:
|