working???
Browse files- app.py +15 -0
- 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
|