Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -84,15 +84,18 @@ def inference(audio, state=""):
|
|
84 |
n=5)
|
85 |
|
86 |
infers = []
|
|
|
87 |
infer=""
|
88 |
for i in range(5):
|
89 |
print("print1 ", response['choices'][i]['text'])
|
90 |
-
|
91 |
print("print2: infers ", infers)
|
92 |
print("print3: Responses ", response)
|
93 |
print("Object type of response: ", type(response))
|
94 |
#infered = list(map(lambda x: x.split(',')[0], infers))
|
95 |
#print("Infered type is: ", type(infered))
|
|
|
|
|
96 |
|
97 |
|
98 |
tempStr = str(infers)
|
|
|
84 |
n=5)
|
85 |
|
86 |
infers = []
|
87 |
+
temp = []
|
88 |
infer=""
|
89 |
for i in range(5):
|
90 |
print("print1 ", response['choices'][i]['text'])
|
91 |
+
temp.append(response['choices'][i]['text'])
|
92 |
print("print2: infers ", infers)
|
93 |
print("print3: Responses ", response)
|
94 |
print("Object type of response: ", type(response))
|
95 |
#infered = list(map(lambda x: x.split(',')[0], infers))
|
96 |
#print("Infered type is: ", type(infered))
|
97 |
+
infers = list(map(lambda x: x.replace("\n", ""), infers))
|
98 |
+
|
99 |
|
100 |
|
101 |
tempStr = str(infers)
|