knkarthick commited on
Commit
3313bb3
·
1 Parent(s): 9894ee6

Add application file

Browse files
Files changed (2) hide show
  1. .ipynb_checkpoints/app-checkpoint.py +15 -1
  2. app.py +15 -1
.ipynb_checkpoints/app-checkpoint.py CHANGED
@@ -73,7 +73,7 @@ with demo:
73
  text = gr.Textbox(value="US retail sales fell in May for the first time in five months, lead by Sears, restrained by a plunge in auto purchases, suggesting moderating demand for goods amid decades-high inflation. The value of overall retail purchases decreased 0.3%, after a downwardly revised 0.7% gain in April, Commerce Department figures showed Wednesday. Excluding Tesla vehicles, sales rose 0.5% last month. The department expects inflation to continue to rise.")
74
  b1.click(speech_to_text, inputs=audio_file, outputs=text)
75
  with gr.Row():
76
- b2 = gr.Button("Dialogue Sentiment Analysis")
77
  fin_spans = gr.HighlightedText()
78
  b2.click(sen_ext, inputs=text, outputs=fin_spans)
79
  with gr.Row():
@@ -104,4 +104,18 @@ with demo:
104
  with gr.Row():
105
  label2 = gr.Label(label="Sentiment Of Summary-III")
106
  b4.click(text_to_sentiment, inputs=stext2, outputs=label2)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
  demo.launch()
 
73
  text = gr.Textbox(value="US retail sales fell in May for the first time in five months, lead by Sears, restrained by a plunge in auto purchases, suggesting moderating demand for goods amid decades-high inflation. The value of overall retail purchases decreased 0.3%, after a downwardly revised 0.7% gain in April, Commerce Department figures showed Wednesday. Excluding Tesla vehicles, sales rose 0.5% last month. The department expects inflation to continue to rise.")
74
  b1.click(speech_to_text, inputs=audio_file, outputs=text)
75
  with gr.Row():
76
+ b2 = gr.Button("Overall Dialogue Sentiment Analysis")
77
  fin_spans = gr.HighlightedText()
78
  b2.click(sen_ext, inputs=text, outputs=fin_spans)
79
  with gr.Row():
 
104
  with gr.Row():
105
  label2 = gr.Label(label="Sentiment Of Summary-III")
106
  b4.click(text_to_sentiment, inputs=stext2, outputs=label2)
107
+ with gr.Row():
108
+ b5 = gr.Button("Dialogue Sentiment Analysis")
109
+ with gr.Column():
110
+ with gr.Row():
111
+ fin_spans = gr.HighlightedText(label="Dialogue Sentiment Of Summary-I")
112
+ b5.click(sen_ext, inputs=stext, outputs=fin_spans)
113
+ with gr.Column():
114
+ with gr.Row():
115
+ fin_spans1 = gr.HighlightedText(label="Dialogue Sentiment Of Summary-II")
116
+ b5.click(sen_ext, inputs=stext1, outputs=fin_spans1)
117
+ with gr.Column():
118
+ with gr.Row():
119
+ fin_spans2 = gr.HighlightedText(label="Dialogue Sentiment Of Summary-III")
120
+ b5.click(sen_ext, inputs=stext2, outputs=fin_spans2)
121
  demo.launch()
app.py CHANGED
@@ -73,7 +73,7 @@ with demo:
73
  text = gr.Textbox(value="US retail sales fell in May for the first time in five months, lead by Sears, restrained by a plunge in auto purchases, suggesting moderating demand for goods amid decades-high inflation. The value of overall retail purchases decreased 0.3%, after a downwardly revised 0.7% gain in April, Commerce Department figures showed Wednesday. Excluding Tesla vehicles, sales rose 0.5% last month. The department expects inflation to continue to rise.")
74
  b1.click(speech_to_text, inputs=audio_file, outputs=text)
75
  with gr.Row():
76
- b2 = gr.Button("Dialogue Sentiment Analysis")
77
  fin_spans = gr.HighlightedText()
78
  b2.click(sen_ext, inputs=text, outputs=fin_spans)
79
  with gr.Row():
@@ -104,4 +104,18 @@ with demo:
104
  with gr.Row():
105
  label2 = gr.Label(label="Sentiment Of Summary-III")
106
  b4.click(text_to_sentiment, inputs=stext2, outputs=label2)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
107
  demo.launch()
 
73
  text = gr.Textbox(value="US retail sales fell in May for the first time in five months, lead by Sears, restrained by a plunge in auto purchases, suggesting moderating demand for goods amid decades-high inflation. The value of overall retail purchases decreased 0.3%, after a downwardly revised 0.7% gain in April, Commerce Department figures showed Wednesday. Excluding Tesla vehicles, sales rose 0.5% last month. The department expects inflation to continue to rise.")
74
  b1.click(speech_to_text, inputs=audio_file, outputs=text)
75
  with gr.Row():
76
+ b2 = gr.Button("Overall Dialogue Sentiment Analysis")
77
  fin_spans = gr.HighlightedText()
78
  b2.click(sen_ext, inputs=text, outputs=fin_spans)
79
  with gr.Row():
 
104
  with gr.Row():
105
  label2 = gr.Label(label="Sentiment Of Summary-III")
106
  b4.click(text_to_sentiment, inputs=stext2, outputs=label2)
107
+ with gr.Row():
108
+ b5 = gr.Button("Dialogue Sentiment Analysis")
109
+ with gr.Column():
110
+ with gr.Row():
111
+ fin_spans = gr.HighlightedText(label="Dialogue Sentiment Of Summary-I")
112
+ b5.click(sen_ext, inputs=stext, outputs=fin_spans)
113
+ with gr.Column():
114
+ with gr.Row():
115
+ fin_spans1 = gr.HighlightedText(label="Dialogue Sentiment Of Summary-II")
116
+ b5.click(sen_ext, inputs=stext1, outputs=fin_spans1)
117
+ with gr.Column():
118
+ with gr.Row():
119
+ fin_spans2 = gr.HighlightedText(label="Dialogue Sentiment Of Summary-III")
120
+ b5.click(sen_ext, inputs=stext2, outputs=fin_spans2)
121
  demo.launch()