Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -85,7 +85,7 @@ def inference(audio, state=""):
|
|
85 |
|
86 |
infers = []
|
87 |
temp = []
|
88 |
-
|
89 |
for i in range(5):
|
90 |
print("print1 ", response['choices'][i]['text'])
|
91 |
temp.append(response['choices'][i]['text'])
|
@@ -95,6 +95,7 @@ def inference(audio, state=""):
|
|
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", ""), temp))
|
|
|
98 |
|
99 |
|
100 |
|
@@ -104,7 +105,7 @@ def inference(audio, state=""):
|
|
104 |
|
105 |
# result.text
|
106 |
#return getText, gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
|
107 |
-
return result.text, state,
|
108 |
|
109 |
|
110 |
|
|
|
85 |
|
86 |
infers = []
|
87 |
temp = []
|
88 |
+
infered=[]
|
89 |
for i in range(5):
|
90 |
print("print1 ", response['choices'][i]['text'])
|
91 |
temp.append(response['choices'][i]['text'])
|
|
|
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", ""), temp))
|
98 |
+
infered = list(map(lambda x: x.split(','), infers))
|
99 |
|
100 |
|
101 |
|
|
|
105 |
|
106 |
# result.text
|
107 |
#return getText, gr.update(visible=True), gr.update(visible=True), gr.update(visible=True)
|
108 |
+
return result.text, state, infered
|
109 |
|
110 |
|
111 |
|