Sbeha001 commited on
Commit
a266fba
·
verified ·
1 Parent(s): 87cbb21

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -6
app.py CHANGED
@@ -1,9 +1,12 @@
1
- import streamlit as st
2
  from transformers import pipeline
3
 
4
- pipe = pipeline("summarization", model="facebook/bart-large-cnn")
5
- text = st.text_area('enter some text')
6
 
7
- if text:
8
- out = pipe(text)
9
- st.json(out)
 
 
 
 
 
1
+ import gradio as gr
2
  from transformers import pipeline
3
 
4
+ equal = pipeline("summarization", model="facebook/bart-large-cnn")
 
5
 
6
+ def things(text):
7
+ return equal(text)
8
+
9
+ testing = gr.Interface(fn=things, inputs="text", outputs="text")
10
+ testing.launch()
11
+
12
+ #created by Sebastian Behar