KingZack commited on
Commit
1b28596
1 Parent(s): 5c04dbd

Adding model to app

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -1,5 +1,13 @@
1
  import streamlit as st
 
2
 
3
- x = st.slider('Select a value')
4
- st.write(x, 'squared is', x * x)
 
 
 
 
 
 
 
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