Spaces:
Running
Running
fix new gradio errors
Browse files
app.py
CHANGED
|
@@ -11,7 +11,7 @@ all = load_dataset("raminass/opinions-94-23")
|
|
| 11 |
|
| 12 |
df = pd.DataFrame(all["train"])
|
| 13 |
choices = []
|
| 14 |
-
percuriams = df[df.type == "per_curiam"]
|
| 15 |
percuriams["case_name"] = percuriams["case_name"].apply(lambda x: x.strip())
|
| 16 |
percuriams = percuriams.sort_values(by="case_name", key=lambda x: x.str.lower())
|
| 17 |
|
|
@@ -83,7 +83,7 @@ with gr.Blocks() as demo:
|
|
| 83 |
with gr.Row():
|
| 84 |
clear_btn = gr.Button("Clear")
|
| 85 |
greet_btn = gr.Button("Predict")
|
| 86 |
-
op_level = gr.
|
| 87 |
num_top_classes=9, label="Predicted author of opinion"
|
| 88 |
)
|
| 89 |
output_textbox = gr.Textbox(label="Output Text", show_copy_button=True)
|
|
|
|
| 11 |
|
| 12 |
df = pd.DataFrame(all["train"])
|
| 13 |
choices = []
|
| 14 |
+
percuriams = df[df.type == "per_curiam"].copy()
|
| 15 |
percuriams["case_name"] = percuriams["case_name"].apply(lambda x: x.strip())
|
| 16 |
percuriams = percuriams.sort_values(by="case_name", key=lambda x: x.str.lower())
|
| 17 |
|
|
|
|
| 83 |
with gr.Row():
|
| 84 |
clear_btn = gr.Button("Clear")
|
| 85 |
greet_btn = gr.Button("Predict")
|
| 86 |
+
op_level = gr.Label(
|
| 87 |
num_top_classes=9, label="Predicted author of opinion"
|
| 88 |
)
|
| 89 |
output_textbox = gr.Textbox(label="Output Text", show_copy_button=True)
|