Spaces:
Sleeping
Sleeping
perhaps this will work
Browse files
app.py
CHANGED
|
@@ -42,8 +42,9 @@ def predict (Sentence, Word, LLM, Norm, Layer):
|
|
| 42 |
df = pd.DataFrame({'feature':labels, 'value':pred_list})
|
| 43 |
df = df[df['value'] > 0]
|
| 44 |
df_sorted = df.sort_values(by='value', ascending=False)
|
|
|
|
| 45 |
|
| 46 |
-
output = [
|
| 47 |
print("All Positive Predicted Values:\n"+"\n".join(output))
|
| 48 |
|
| 49 |
demo = gr.Interface(
|
|
|
|
| 42 |
df = pd.DataFrame({'feature':labels, 'value':pred_list})
|
| 43 |
df = df[df['value'] > 0]
|
| 44 |
df_sorted = df.sort_values(by='value', ascending=False)
|
| 45 |
+
df_sorted = df_sorted.reset_index()
|
| 46 |
|
| 47 |
+
output = [row['feature']+'\t\t\t\t\t\t\t'+str(row['value']) for _, row in df_sorted.iterrows()]
|
| 48 |
print("All Positive Predicted Values:\n"+"\n".join(output))
|
| 49 |
|
| 50 |
demo = gr.Interface(
|