Spaces:
Sleeping
Sleeping
Adding model to app
Browse files
app.py
CHANGED
@@ -1,5 +1,13 @@
|
|
1 |
import streamlit as st
|
|
|
2 |
|
3 |
-
|
4 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
|
|
|
1 |
import streamlit as st
|
2 |
+
from transformers import pipeline
|
3 |
|
4 |
+
model_location = "KingZack/future-futurama-maker"
|
5 |
+
pipe = pipeline("text-generation", model=model_location)
|
6 |
+
|
7 |
+
text = st.text_area('Give me ideas to generate a new Futurama episode...')
|
8 |
+
|
9 |
+
if text:
|
10 |
+
generated_response_object = pipe(text, max_length=333)
|
11 |
+
actual_response = generated_response_object[0]['generated_text']
|
12 |
+
st.text(actual_response)
|
13 |
|