Spaces:
Configuration error
Configuration error
Update app.py
Browse files
app.py
CHANGED
@@ -65,8 +65,6 @@ mes3 = [
|
|
65 |
{"role": "system", "content": "You are my personal assistant. Your name is Alice."}
|
66 |
]
|
67 |
|
68 |
-
res = []
|
69 |
-
|
70 |
OUT_PATH = 'out/'
|
71 |
|
72 |
# create output path
|
@@ -136,9 +134,6 @@ def greet(apikey, Voicetoclone, VoiceMicrophone, Texts, choice1):
|
|
136 |
|
137 |
openai.api_key = apikey
|
138 |
|
139 |
-
result = Texts
|
140 |
-
res.append(result)
|
141 |
-
|
142 |
if choice1 == "TOEFL":
|
143 |
messages = mes1
|
144 |
elif choice1 == "Therapist":
|
@@ -147,8 +142,7 @@ def greet(apikey, Voicetoclone, VoiceMicrophone, Texts, choice1):
|
|
147 |
messages = mes3
|
148 |
|
149 |
# chatgpt
|
150 |
-
|
151 |
-
content = res[n-1]
|
152 |
messages.append({"role": "user", "content": content})
|
153 |
|
154 |
completion = openai.ChatCompletion.create(
|
|
|
65 |
{"role": "system", "content": "You are my personal assistant. Your name is Alice."}
|
66 |
]
|
67 |
|
|
|
|
|
68 |
OUT_PATH = 'out/'
|
69 |
|
70 |
# create output path
|
|
|
134 |
|
135 |
openai.api_key = apikey
|
136 |
|
|
|
|
|
|
|
137 |
if choice1 == "TOEFL":
|
138 |
messages = mes1
|
139 |
elif choice1 == "Therapist":
|
|
|
142 |
messages = mes3
|
143 |
|
144 |
# chatgpt
|
145 |
+
content = Texts + ""
|
|
|
146 |
messages.append({"role": "user", "content": content})
|
147 |
|
148 |
completion = openai.ChatCompletion.create(
|