ashwinncj commited on
Commit
26642c1
·
1 Parent(s): 69e99ce

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -2
app.py CHANGED
@@ -1,4 +1,12 @@
 
 
 
 
1
  import streamlit as st
2
 
3
- x = st.slider('Select a value')
4
- st.write(x, 'squared is', x * x)
 
 
 
 
 
1
+ # Use a pipeline as a high-level helper
2
+ from transformers import pipeline
3
+
4
+ # import streamlit
5
  import streamlit as st
6
 
7
+ pipe = pipeline("text-generation", model="OpenAssistant/codellama-13b-oasst-sft-v10")
8
+
9
+ user_input = st.text_input("Enter a prompt:")
10
+ if user_input:
11
+ response = pipe(user_input)
12
+ st.write(response)