Spaces:
Sleeping
Sleeping
DariaKhot commited on
Commit ·
6e85008
1
Parent(s): b44c3dc
update
Browse files- app.py +5 -3
- requirements.txt +3 -1
app.py
CHANGED
|
@@ -1,9 +1,11 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
from transformers import pipeline
|
|
|
|
|
|
|
| 3 |
|
| 4 |
|
| 5 |
###################################################
|
| 6 |
-
model_name = "
|
| 7 |
pipe = pipeline("text-generation", model=model_name)
|
| 8 |
|
| 9 |
|
|
@@ -13,8 +15,8 @@ weathers = ["Sunny", "Rainy", "Snowy"]
|
|
| 13 |
activities = ["Skiing", "Hiking", "Swimming", "Relaxing"]
|
| 14 |
weather = st.selectbox("What is the weather like?", weathers)
|
| 15 |
activity = st.selectbox("What activity do you prefer?", activities)
|
| 16 |
-
input_prompt = f"The weather
|
| 17 |
-
|
| 18 |
if st.button('Recommend a Resort'):
|
| 19 |
with st.spinner('Generating recommendation...'):
|
| 20 |
# Generate text based on the input prompt
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
from transformers import pipeline
|
| 3 |
+
import tensorflow
|
| 4 |
+
|
| 5 |
|
| 6 |
|
| 7 |
###################################################
|
| 8 |
+
model_name = "declare-lab/flan-alpaca-gpt4-xl"
|
| 9 |
pipe = pipeline("text-generation", model=model_name)
|
| 10 |
|
| 11 |
|
|
|
|
| 15 |
activities = ["Skiing", "Hiking", "Swimming", "Relaxing"]
|
| 16 |
weather = st.selectbox("What is the weather like?", weathers)
|
| 17 |
activity = st.selectbox("What activity do you prefer?", activities)
|
| 18 |
+
input_prompt = f"I'm looking for a resort recommendation. The weather should be {weather.lower()}, and I'm interested in activities like {activity.lower()}. What do you suggest?"
|
| 19 |
+
|
| 20 |
if st.button('Recommend a Resort'):
|
| 21 |
with st.spinner('Generating recommendation...'):
|
| 22 |
# Generate text based on the input prompt
|
requirements.txt
CHANGED
|
@@ -1 +1,3 @@
|
|
| 1 |
-
transformers
|
|
|
|
|
|
|
|
|
| 1 |
+
transformers
|
| 2 |
+
streamlit
|
| 3 |
+
tensorflow
|