asmashayea commited on
Commit
aceadab
·
1 Parent(s): aa9f0d3
Files changed (1) hide show
  1. app.py +7 -3
app.py CHANGED
@@ -7,16 +7,20 @@ def run_absa(review, model_choice):
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, GPT) to extract aspects, opinions, and sentiment using LoRA adapters"
 
 
19
  )
20
 
21
  if __name__ == "__main__":
22
- demo.launch()
 
 
7
  except Exception as e:
8
  return {"error": str(e)}
9
 
10
+
11
  demo = gr.Interface(
12
  fn=run_absa,
13
  inputs=[
14
  gr.Textbox(label="Arabic Review"),
15
  gr.Dropdown(choices=list(MODEL_OPTIONS.keys()), label="Choose Model", value="Araberta")
16
  ],
17
+ outputs=gr.JSON(label="Extracted Aspects & Sentiments"),
18
  title="Arabic ABSA (Aspect-Based Sentiment Analysis)",
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
  )
23
 
24
  if __name__ == "__main__":
25
+ demo.launch() # ← no clear_button here
26
+