Spaces:
Sleeping
Sleeping
Commit ·
7f8afd8
1
Parent(s): 5a982f2
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,18 @@
|
|
| 1 |
import streamlit as st
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
-
x = st.slider('Select a value')
|
| 4 |
-
st.write(x, 'squared is', x * x)
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
+
from transformers import pipeline
|
| 3 |
+
from langchain.llms import GooglePalm
|
| 4 |
+
|
| 5 |
+
#x = st.slider('Select a value')
|
| 6 |
+
#st.write(x, 'squared is', x * x)
|
| 7 |
+
|
| 8 |
+
#pipe = pipeline('sentiment-analysis')
|
| 9 |
+
|
| 10 |
+
api_key = $GOOGLE_PALM_API_KEY
|
| 11 |
+
llm = GooglePalm(google_api_key=api_key, temperature=0.1)
|
| 12 |
+
|
| 13 |
+
text = st.text_area('enter text to get assistance!')
|
| 14 |
+
|
| 15 |
+
if text:
|
| 16 |
+
out = llm(text)
|
| 17 |
+
st.json(out)
|
| 18 |
|
|
|
|
|
|