Spaces:
Runtime error
Runtime error
j-hartmann
commited on
Commit
•
eaead3f
1
Parent(s):
59e6bef
Update app.py
Browse files
app.py
CHANGED
@@ -78,17 +78,17 @@ def bulk_function(filename):
|
|
78 |
temp = (np.exp(predictions[0])/np.exp(predictions[0]).sum(-1,keepdims=True))
|
79 |
|
80 |
# container
|
81 |
-
high = []
|
82 |
low = []
|
|
|
83 |
|
84 |
# extract scores (as many entries as exist in pred_texts)
|
85 |
for i in range(len(lines_s)):
|
86 |
-
|
87 |
-
|
88 |
|
89 |
|
90 |
# define df
|
91 |
-
df = pd.DataFrame(list(zip(ids,lines_s,labels,scores_rounded,
|
92 |
print(df)
|
93 |
# save results to csv
|
94 |
YOUR_FILENAME = filename.name.split(".")[0] + "_MindMiner_Predictions" + ".csv" # name your output file
|
|
|
78 |
temp = (np.exp(predictions[0])/np.exp(predictions[0]).sum(-1,keepdims=True))
|
79 |
|
80 |
# container
|
|
|
81 |
low = []
|
82 |
+
high = []
|
83 |
|
84 |
# extract scores (as many entries as exist in pred_texts)
|
85 |
for i in range(len(lines_s)):
|
86 |
+
low.append(round(temp[i][0], 3))
|
87 |
+
high.append(round(temp[i][1], 3))
|
88 |
|
89 |
|
90 |
# define df
|
91 |
+
df = pd.DataFrame(list(zip(ids,lines_s,labels,scores_rounded, low, high)), columns=[df_input.columns[0], df_input.columns[1],'max_label','max_score', 'low', 'high'])
|
92 |
print(df)
|
93 |
# save results to csv
|
94 |
YOUR_FILENAME = filename.name.split(".")[0] + "_MindMiner_Predictions" + ".csv" # name your output file
|