Create app.py
Browse files
app.py
ADDED
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
import openai
|
3 |
+
|
4 |
+
# Set the OpenAI API key
|
5 |
+
openai.api_key = "YOUR_OPENAI_API_KEY"
|
6 |
+
|
7 |
+
st.title("Investment Property Finder in Breckenridge and Blue River, CO")
|
8 |
+
|
9 |
+
# User inputs
|
10 |
+
max_price = st.text_input("Maximum Price")
|
11 |
+
amenities = st.multiselect("Amenities", ["Close to Skiing", "Hot Tub", "Bus Route", "Parking"])
|
12 |
+
bedrooms = st.selectbox("Bedrooms", ["1", "2", "3", "4", "5+"])
|
13 |
+
bathrooms = st.selectbox("Bathrooms", ["1", "2", "3", "4", "5+"])
|
14 |
+
square_footage = st.selectbox("Square Footage", ["<1000 sqft", "1000-2000 sqft", "2000-3000 sqft", "3000-4000 sqft", "4000+ sqft"])
|
15 |
+
|
16 |
+
if st.button('Find Property'):
|
17 |
+
# Process the inputs and call the OpenAI API
|
18 |
+
user_input = f"I'm considering buying an investment property in Breckenridge and Blue River, CO. My maximum price is {max_price}. I'm looking for these amenities: {', '.join(amenities)}. Bedrooms: {bedrooms}, Bathrooms: {bathrooms}, Square Footage: {square_footage}."
|
19 |
+
# Call the OpenAI API here with the user_input and get the response
|
20 |
+
response = "API response based on user input will be displayed here."
|
21 |
+
|
22 |
+
st.write(response)
|