Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,11 +1,9 @@
|
|
1 |
-
import
|
|
|
2 |
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
[" taj mahal is "]
|
10 |
-
]
|
11 |
-
gr.Interface.load("huggingface/facebook/opt-125m", inputs=gr.inputs.Textbox(lines=5, label="Input Text"),title=title,description=description,article=article, examples=examples,enable_queue=True).launch()
|
|
|
1 |
+
import streamlit as st
|
2 |
+
from transformers import pipeline
|
3 |
|
4 |
+
generator = pipeline('text-generation', model="facebook/opt-125m")
|
5 |
+
prompt = st.text_area('Enter text below to generate new text using facebook_OPT_350m_Language_model')
|
6 |
+
|
7 |
+
if prompt:
|
8 |
+
out = generator(prompt)
|
9 |
+
st.json(out)
|
|
|
|
|
|