Update app.py
Browse files
app.py
CHANGED
@@ -140,8 +140,8 @@ def quad(query,file):
|
|
140 |
#resp = summarizer(answer)
|
141 |
#stext = resp[0]['summary_text']
|
142 |
|
143 |
-
|
144 |
-
return answer,summarize_text(answer),
|
145 |
|
146 |
|
147 |
# b6 = gr.Button("Get Sustainability")
|
@@ -151,7 +151,7 @@ def quad(query,file):
|
|
151 |
#iface = gr.Interface(fn=get_sustainability, inputs="textbox", title="CONBERT",description="SUSTAINABILITY TOOL", outputs=gr.HighlightedText(), allow_flagging="never")
|
152 |
#iface.launch()
|
153 |
|
154 |
-
iface = gr.Interface(fn=quad, inputs=[gr.inputs.Textbox(label='SEARCH QUERY'),gr.inputs.File(label='TXT FILE')], title="CONBERT",description="SUSTAINABILITY TOOL",article='Article', outputs=[gr.outputs.Textbox(label='Answer'),gr.outputs.Textbox(label='Summary'),
|
155 |
|
156 |
|
157 |
iface.launch()
|
|
|
140 |
#resp = summarizer(answer)
|
141 |
#stext = resp[0]['summary_text']
|
142 |
|
143 |
+
# highlight,dff=score_fincat(answer)
|
144 |
+
return answer,summarize_text(answer),fin_ner(answer),get_sustainability(answer),fls(answer)
|
145 |
|
146 |
|
147 |
# b6 = gr.Button("Get Sustainability")
|
|
|
151 |
#iface = gr.Interface(fn=get_sustainability, inputs="textbox", title="CONBERT",description="SUSTAINABILITY TOOL", outputs=gr.HighlightedText(), allow_flagging="never")
|
152 |
#iface.launch()
|
153 |
|
154 |
+
iface = gr.Interface(fn=quad, inputs=[gr.inputs.Textbox(label='SEARCH QUERY'),gr.inputs.File(label='TXT FILE')], title="CONBERT",description="SUSTAINABILITY TOOL",article='Article', outputs=[gr.outputs.Textbox(label='Answer'),gr.outputs.Textbox(label='Summary'),gr.HighlightedText(label='NER'),gr.HighlightedText(label='SUSTAINABILITY'),gr.HighlightedText(label='FLS')], allow_flagging="never")
|
155 |
|
156 |
|
157 |
iface.launch()
|