Spaces:
Sleeping
Sleeping
import streamlit as st | |
import helper | |
import os | |
# Streamlit app title | |
st.title("Voyage Voicer ππποΈ") | |
# User input textbox | |
user_input = st.text_input("Enter your destination :",placeholder='paris') | |
if st.button("Get Langchain Response"): | |
# Use OpenAI to enhance the response | |
# response = openai.Completion.create( | |
# engine="text-davinci-002", | |
# prompt=user_input, | |
# max_tokens=50 | |
# ) | |
response = helper.generate_restaurant_name_and_items(user_input) | |
st.subheader(f"Vacation Destination: {response['travel_place']}") | |
st.subheader(f"πΊοΈ Places to visit: {response['places']}") | |
st.subheader('Must try π½οΈ:') | |
menu_items = response['food'].strip() | |
menu_items_list = menu_items.split('\n\n') | |
for category in menu_items_list: | |
st.write(category) | |
st.subheader(f"Top π things to do: {response['toDo']}") | |