03chrisk commited on
Commit
509c29f
·
1 Parent(s): b0ea36b

working???

Browse files
Files changed (2) hide show
  1. app.py +15 -0
  2. requirements.txt +0 -0
app.py CHANGED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from transformers import pipeline
2
+ import streamlit as st
3
+
4
+ model = pipeline(
5
+ "summarization",
6
+ )
7
+
8
+ def predict(prompt):
9
+ summary = model(prompt)[0]["summary_text"]
10
+ return summary
11
+
12
+
13
+ # create an interface for the model
14
+ with st.Interface(predict, "textbox", "text") as interface:
15
+ interface.launch()
requirements.txt ADDED
File without changes