nniehaus commited on
Commit
c90a021
·
1 Parent(s): 534759b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -2
app.py CHANGED
@@ -16,7 +16,13 @@ square_footage = st.selectbox("Square Footage", ["<1000 sqft", "1000-2000 sqft",
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)
 
 
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
+
20
  # Call the OpenAI API here with the user_input and get the response
21
+ response = openai.Completion.create(
22
+ engine="text-davinci-003", # Replace with your preferred model
23
+ prompt=user_input,
24
+ max_tokens=150
25
+ )
26
 
27
+ # Display the response from the API
28
+ st.write(response.choices[0].text.strip())