Spaces:
Runtime error
Runtime error
venkatks515
commited on
Commit
•
921e772
1
Parent(s):
246cae1
Update app.py
Browse files
app.py
CHANGED
@@ -3,11 +3,12 @@ import transformers
|
|
3 |
from transformers import pipeline
|
4 |
|
5 |
st.title("Text Generation with Hugging Face")
|
|
|
6 |
|
7 |
model_name = "bigscience/mt0-xxl-mt"
|
8 |
generator = pipeline("text-generation", model=model_name, device=0)
|
9 |
|
10 |
-
|
11 |
|
12 |
if st.button("Generate Text"):
|
13 |
output = generator(prompt, max_length=100, do_sample=True)
|
|
|
3 |
from transformers import pipeline
|
4 |
|
5 |
st.title("Text Generation with Hugging Face")
|
6 |
+
prompt = st.text_input("Enter text prompt:", "Once upon a time")
|
7 |
|
8 |
model_name = "bigscience/mt0-xxl-mt"
|
9 |
generator = pipeline("text-generation", model=model_name, device=0)
|
10 |
|
11 |
+
|
12 |
|
13 |
if st.button("Generate Text"):
|
14 |
output = generator(prompt, max_length=100, do_sample=True)
|