Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -65,24 +65,24 @@ def inference(audio, prompt, model, temperature, latest):
|
|
65 |
n=5)
|
66 |
|
67 |
#infers = []
|
68 |
-
infers = []
|
69 |
temp = []
|
70 |
-
|
71 |
|
72 |
for i in range(5):
|
73 |
print("print1 ", response['choices'][i]['text'])
|
74 |
temp.append(response['choices'][i]['text'])
|
75 |
-
print("print2: infers ",
|
76 |
print("print3: Responses ", response)
|
77 |
print("Object type of response: ", type(response))
|
78 |
#infered = list(map(lambda x: x.split(',')[0], infers))
|
79 |
#print("Infered type is: ", type(infered))
|
80 |
-
|
81 |
#infered = list(map(lambda x: x.split(','), infers))
|
82 |
|
83 |
-
infers = pd.Series( (el[0] for el in
|
84 |
|
85 |
-
infers.drop_duplicates(keep='first', inplace=True)
|
86 |
print("Infers DataType ", type(infers), "Infers after drop: ", infers, "Infers at 0: ", infers[0])
|
87 |
res = []
|
88 |
|
|
|
65 |
n=5)
|
66 |
|
67 |
#infers = []
|
68 |
+
#infers = []
|
69 |
temp = []
|
70 |
+
infered=[]
|
71 |
|
72 |
for i in range(5):
|
73 |
print("print1 ", response['choices'][i]['text'])
|
74 |
temp.append(response['choices'][i]['text'])
|
75 |
+
print("print2: infers ", infered)
|
76 |
print("print3: Responses ", response)
|
77 |
print("Object type of response: ", type(response))
|
78 |
#infered = list(map(lambda x: x.split(',')[0], infers))
|
79 |
#print("Infered type is: ", type(infered))
|
80 |
+
infered = list(map(lambda x: x.replace("\n", ""), temp))
|
81 |
#infered = list(map(lambda x: x.split(','), infers))
|
82 |
|
83 |
+
infers = pd.Series( (el[0] for el in infered) )
|
84 |
|
85 |
+
#infers.drop_duplicates(keep='first', inplace=True)
|
86 |
print("Infers DataType ", type(infers), "Infers after drop: ", infers, "Infers at 0: ", infers[0])
|
87 |
res = []
|
88 |
|