update gitignore
Browse files- .gitignore +5 -1
- app.py +7 -2
.gitignore
CHANGED
@@ -161,4 +161,8 @@ cython_debug/
|
|
161 |
|
162 |
.DS_Store
|
163 |
|
164 |
-
config.yaml.dev
|
|
|
|
|
|
|
|
|
|
161 |
|
162 |
.DS_Store
|
163 |
|
164 |
+
config.yaml.dev
|
165 |
+
|
166 |
+
public/images
|
167 |
+
public/audios
|
168 |
+
public/videos
|
app.py
CHANGED
@@ -12,6 +12,11 @@ import soundfile as sf
|
|
12 |
|
13 |
import groq_app as gq
|
14 |
|
|
|
|
|
|
|
|
|
|
|
15 |
# API key
|
16 |
client = Groq(api_key=gq.GROQ_API_KEY)
|
17 |
MODEL = "llama-3.1-70b-versatile"
|
@@ -148,7 +153,7 @@ examples = [
|
|
148 |
"(3 + 5) * (10 - 2)",
|
149 |
"2 ** 8",
|
150 |
"50 % 3",
|
151 |
-
"generate this text to audio: I like to sing
|
152 |
]
|
153 |
|
154 |
def gradio_chatbot(user_prompt, history=[]):
|
@@ -158,7 +163,7 @@ def gradio_chatbot(user_prompt, history=[]):
|
|
158 |
file_path = None
|
159 |
for message in new_history:
|
160 |
if isinstance(message, dict) and message.get('role') == 'tool' and message.get('name') == 'text-to-speech':
|
161 |
-
file_path = message['content'] # This should be the path to the generated speech file
|
162 |
|
163 |
# Ensure all expected outputs are returned
|
164 |
return response, file_path, new_history
|
|
|
12 |
|
13 |
import groq_app as gq
|
14 |
|
15 |
+
|
16 |
+
#os.makedirs("public/images", exist_ok=True)
|
17 |
+
#os.makedirs("public/audios", exist_ok=True)
|
18 |
+
#os.makedirs("public/videos", exist_ok=True)
|
19 |
+
|
20 |
# API key
|
21 |
client = Groq(api_key=gq.GROQ_API_KEY)
|
22 |
MODEL = "llama-3.1-70b-versatile"
|
|
|
153 |
"(3 + 5) * (10 - 2)",
|
154 |
"2 ** 8",
|
155 |
"50 % 3",
|
156 |
+
"generate this text to audio: I like to sing"
|
157 |
]
|
158 |
|
159 |
def gradio_chatbot(user_prompt, history=[]):
|
|
|
163 |
file_path = None
|
164 |
for message in new_history:
|
165 |
if isinstance(message, dict) and message.get('role') == 'tool' and message.get('name') == 'text-to-speech':
|
166 |
+
file_path = "public/audios/" + message['content'] # This should be the path to the generated speech file
|
167 |
|
168 |
# Ensure all expected outputs are returned
|
169 |
return response, file_path, new_history
|