Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,11 @@
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
|
|
3 |
|
4 |
-
|
|
|
|
|
|
|
5 |
|
6 |
st.title("Text Summarization")
|
7 |
st.write("""##### This demo summarizes a given text. :sunglasses:""")
|
|
|
1 |
import streamlit as st
|
2 |
from transformers import pipeline
|
3 |
+
from transformers import AutoModelForCasualLM, AutoTokenizer
|
4 |
|
5 |
+
tokenizer = AutoTokenizer.from_pretrained("bigscience/bloom")
|
6 |
+
model_use = AutoModelForCasualLM.from_pretrained("bigscience/bloom", device_map="auto", torch_dtype="auto",)
|
7 |
+
|
8 |
+
summarizer = pipeline('summarization', model=model_use)
|
9 |
|
10 |
st.title("Text Summarization")
|
11 |
st.write("""##### This demo summarizes a given text. :sunglasses:""")
|