Spaces:
Runtime error
Runtime error
Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
from transformers import pipeline, set_seed
|
2 |
+
import streamlit as st
|
3 |
+
|
4 |
+
generator = pipeline('text-generation', model='gpt2')
|
5 |
+
set_seed(41)
|
6 |
+
|
7 |
+
text = st.text_area('Enter Explanation')
|
8 |
+
if text:
|
9 |
+
out = generator(text)
|
10 |
+
st.json(out)
|