Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
|
@@ -39,11 +39,7 @@ def transcribe(audio_file):
|
|
| 39 |
# Text Generation Function
|
| 40 |
def generate_text(prompt):
|
| 41 |
formatted_prompt = format_prompt(prompt)
|
| 42 |
-
|
| 43 |
-
response = ""
|
| 44 |
-
for message in client.chat_completion(messages, max_tokens=512, stream=True, temperature=0.7, top_p=0.95):
|
| 45 |
-
token = message.choices[0].delta.content
|
| 46 |
-
response += token
|
| 47 |
return response.strip()
|
| 48 |
|
| 49 |
# TTS Function
|
|
|
|
| 39 |
# Text Generation Function
|
| 40 |
def generate_text(prompt):
|
| 41 |
formatted_prompt = format_prompt(prompt)
|
| 42 |
+
response = client.text_generation(formatted_prompt, max_new_tokens=512, temperature=0.7, top_p=0.95)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 43 |
return response.strip()
|
| 44 |
|
| 45 |
# TTS Function
|