Spaces:
Running
Running
Chandima Prabhath
commited on
Commit
·
9d508fe
1
Parent(s):
ea1580e
Remove unused pre_process import and commented-out system prompt logic from generate_voice_reply function
Browse files- VoiceReply.py +0 -6
VoiceReply.py
CHANGED
@@ -3,7 +3,6 @@ import os
|
|
3 |
import time
|
4 |
import urllib.parse
|
5 |
import random
|
6 |
-
from polLLM import pre_process
|
7 |
|
8 |
def generate_voice_reply(prompt, model="openai-audio", voice="coral", audio_dir="."):
|
9 |
"""
|
@@ -26,11 +25,6 @@ def generate_voice_reply(prompt, model="openai-audio", voice="coral", audio_dir=
|
|
26 |
print(f"DEBUG: Received prompt: {prompt}")
|
27 |
os.makedirs(audio_dir, exist_ok=True)
|
28 |
randomSeed = random.randint(0, 9999999)
|
29 |
-
# Append system prompt to the user's prompt
|
30 |
-
system_prompt = pre_process()
|
31 |
-
#full_prompt = f"{prompt}\n\n{system_prompt}"
|
32 |
-
#print(f"DEBUG: Full prompt: {full_prompt}")
|
33 |
-
|
34 |
encoded_prompt = urllib.parse.quote(prompt)
|
35 |
url = f"http://text.pollinations.ai/{encoded_prompt}?model={model}&voice={voice}&seed={randomSeed}"
|
36 |
print(f"DEBUG: Fetching audio with URL: {url}")
|
|
|
3 |
import time
|
4 |
import urllib.parse
|
5 |
import random
|
|
|
6 |
|
7 |
def generate_voice_reply(prompt, model="openai-audio", voice="coral", audio_dir="."):
|
8 |
"""
|
|
|
25 |
print(f"DEBUG: Received prompt: {prompt}")
|
26 |
os.makedirs(audio_dir, exist_ok=True)
|
27 |
randomSeed = random.randint(0, 9999999)
|
|
|
|
|
|
|
|
|
|
|
28 |
encoded_prompt = urllib.parse.quote(prompt)
|
29 |
url = f"http://text.pollinations.ai/{encoded_prompt}?model={model}&voice={voice}&seed={randomSeed}"
|
30 |
print(f"DEBUG: Fetching audio with URL: {url}")
|