Spaces:
Sleeping
Sleeping
Commit
·
6d4cbdb
1
Parent(s):
829c9cb
ok
Browse files
app.py
CHANGED
@@ -7,6 +7,19 @@ def run_absa(review, model_choice):
|
|
7 |
except Exception as e:
|
8 |
return {"error": str(e)}
|
9 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
|
11 |
demo = gr.Interface(
|
12 |
fn=run_absa,
|
@@ -19,9 +32,7 @@ demo = gr.Interface(
|
|
19 |
description="Write a review and choose a model to extract aspects with sentiment",
|
20 |
allow_flagging="never",
|
21 |
article="Developed by Asma Shayea • Part of MSc Thesis Research",
|
22 |
-
show_clear_button=False # ✅ This hides the Clear button
|
23 |
)
|
24 |
|
25 |
if __name__ == "__main__":
|
26 |
-
demo.launch(
|
27 |
-
|
|
|
7 |
except Exception as e:
|
8 |
return {"error": str(e)}
|
9 |
|
10 |
+
demo = gr.Interface(
|
11 |
+
fn=run_absa,
|
12 |
+
inputs=[
|
13 |
+
gr.Textbox(label="Arabic Review"),
|
14 |
+
gr.Dropdown(choices=list(MODEL_OPTIONS.keys()), label="Choose Model", value="Araberta")
|
15 |
+
],
|
16 |
+
outputs=gr.JSON(label="Extracted Aspect-Sentiment-Opinion Triplets"),
|
17 |
+
title="Arabic ABSA (Aspect-Based Sentiment Analysis)",
|
18 |
+
description="Choose a model (Araberta, mT5, mBART, GPT3.5, ) to extract aspects, opinions, and sentiment using LoRA adapters"
|
19 |
+
)
|
20 |
+
|
21 |
+
if __name__ == "__main__":
|
22 |
+
demo.launch()
|
23 |
|
24 |
demo = gr.Interface(
|
25 |
fn=run_absa,
|
|
|
32 |
description="Write a review and choose a model to extract aspects with sentiment",
|
33 |
allow_flagging="never",
|
34 |
article="Developed by Asma Shayea • Part of MSc Thesis Research",
|
|
|
35 |
)
|
36 |
|
37 |
if __name__ == "__main__":
|
38 |
+
demo.launch()
|
|