Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -67,20 +67,20 @@ def inference(audio, prompt, model, temperature, latest):
|
|
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(
|
84 |
|
85 |
#infers.drop_duplicates(keep='first', inplace=True)
|
86 |
print("Infers DataType ", type(infers), "Infers after drop: ", infers, "Infers at 0: ", infers[0])
|
|
|
67 |
#infers = []
|
68 |
#infers = []
|
69 |
temp = []
|
70 |
+
inferred=[]
|
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 ", inferred)
|
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 |
+
inferred = list(map(lambda x: x.replace("\n", ""), temp))
|
81 |
#infered = list(map(lambda x: x.split(','), infers))
|
82 |
|
83 |
+
infers = pd.Series(inferred)
|
84 |
|
85 |
#infers.drop_duplicates(keep='first', inplace=True)
|
86 |
print("Infers DataType ", type(infers), "Infers after drop: ", infers, "Infers at 0: ", infers[0])
|