SamuelMiller commited on
Commit
104b149
·
1 Parent(s): 9e789ed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +19 -11
app.py CHANGED
@@ -8,19 +8,27 @@ from gradio.mix import Parallel, Series
8
 
9
  desc = "Summarize your text! (audio transcription available soon)"
10
 
 
 
 
 
 
 
 
 
11
  qa_model = 'huggingface/SamuelMiller/qa_squad'
12
  my_model = 'huggingface/SamuelMiller/lil_sumsum'
13
  better_model = 'huggingface/google/pegasus-large'
14
 
15
- def summarize(text):
16
- summ = gr.Interface.load(qa_model)
17
- summary = summ(text)
18
- return summary
19
- iface = gr.Interface(fn=summarize,
20
- theme='huggingface',
21
- title= 'sum_it',
22
- description= desc,
23
- inputs= "text",
24
- outputs= 'textbox')
25
- iface.launch(inline = False)
26
 
 
8
 
9
  desc = "Summarize your text! (audio transcription available soon)"
10
 
11
+
12
+
13
+ pipe = pipeline('sentiment-analysis')
14
+ text = st.text_area('enter some text!')
15
+
16
+ if text:
17
+ out = pipe(text)
18
+ st.json(out)
19
  qa_model = 'huggingface/SamuelMiller/qa_squad'
20
  my_model = 'huggingface/SamuelMiller/lil_sumsum'
21
  better_model = 'huggingface/google/pegasus-large'
22
 
23
+ #def summarize(text):
24
+ #summ = gr.Interface.load(qa_model)
25
+ #summary = summ(text)
26
+ #return summary
27
+ #iface = gr.Interface(fn=summarize,
28
+ #theme='huggingface',
29
+ #title= 'sum_it',
30
+ #description= desc,
31
+ #inputs= "text",
32
+ #outputs= 'textbox')
33
+ #iface.launch(inline = False)
34