HarshaBattula commited on
Commit
5fd634a
β€’
1 Parent(s): 4a3c57b

creating placeholder for rgat+bert

Browse files
Files changed (1) hide show
  1. app.py +22 -1
app.py CHANGED
@@ -64,7 +64,7 @@ aspect_extractor = ATEPCCheckpointManager.get_aspect_extractor(checkpoint='engli
64
 
65
 
66
 
67
- demo = gr.Interface(
68
  annotate_text_sentiment,
69
  [
70
  gr.Textbox(
@@ -82,4 +82,25 @@ demo = gr.Interface(
82
  )
83
 
84
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
  demo.launch()
 
64
 
65
 
66
 
67
+ demo1 = gr.Interface(
68
  annotate_text_sentiment,
69
  [
70
  gr.Textbox(
 
82
  )
83
 
84
 
85
+ demo2 = gr.Interface(
86
+ annotate_text_sentiment,
87
+ [
88
+ gr.Textbox(
89
+ label="Enter the text for polarity detection",
90
+ info="Example: The food was good, but the service was terrible.",
91
+ lines=3,
92
+ ),
93
+ ],
94
+ gr.HighlightedText(
95
+ label="Aspect Detector based on Relational Graph Attention Networks, and BERT",
96
+ combine_adjacent=True,
97
+ show_legend=True,
98
+ ).style(color_map={"+": "green", "-": "red"}),
99
+ theme=gr.themes.Base()
100
+ )
101
+
102
+
103
+
104
+ demo = gr.TabbedInterface([demo1, demo2], ["Aspect Polarity Detection with Extraction", "Aspect Polarity Detection without Extraction"])
105
+
106
  demo.launch()