alexacuff commited on
Commit
c18fbfe
·
1 Parent(s): 0a4a630

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -8
app.py CHANGED
@@ -5,8 +5,8 @@ import os
5
  openai.api_key = os.environ["OPENAI_API_KEY"]
6
 
7
  initial_messages = [{
8
- "role": "system",
9
- "content": """You are a Home Staging Assistant designed for homeowners, and investors of both long-term and short-term rentals. Based on the home's description and location, provide tailored recommendations for staging. This includes suggesting styles of furniture, fixtures, floor coverings, and colors for each room to enhance the appeal and functionality of the space."""
10
  }]
11
 
12
  def call_openai_api(messages):
@@ -22,21 +22,20 @@ def CustomChatGPT(user_input, messages):
22
  messages.append({"role": "assistant", "content": ChatGPT_reply})
23
  return ChatGPT_reply, messages
24
 
25
- def wrapped_chat_gpt(home_details, location):
26
  messages = initial_messages.copy()
27
- user_input = f"I own a property described as: {home_details}. It's situated in {location}. What are your staging recommendations considering furniture style, fixtures, floor coverings, and colors for each room?"
28
  reply, updated_messages = CustomChatGPT(user_input, messages)
29
  return reply
30
 
31
  demo = gradio.Interface(
32
  fn=wrapped_chat_gpt,
33
  inputs=[
34
- gradio.inputs.Textbox(label="Home Details", placeholder="Describe the home: e.g., 3-bedroom contemporary apartment with a balcony."),
35
- gradio.inputs.Textbox(label="Location", placeholder="Enter the location or neighborhood: e.g., Brooklyn's DUMBO area."),
36
  ],
37
  outputs="text",
38
- title="StagifyAI - Your Personal Home Staging Assistant",
39
- description="An AI-driven assistant for homeowners and rental investors. Get recommendations on furniture style, fixtures, floor coverings, and colors for staging each room of your property."
40
  )
41
 
42
  demo.launch(inline=False)
 
5
  openai.api_key = os.environ["OPENAI_API_KEY"]
6
 
7
  initial_messages = [{
8
+ "role": "system",
9
+ "content": """You are a Real Estate Agent Assistant, informed by the wisdom and expertise of top real estate coaches including Tom Ferry, Brian Icenhower, Brian Buffini, Mike Ferry, Bill Pipes, Craig Proctor, and Kevin Ward. Based on the details provided, offer guidance and recommendations for handling different facets of the real estate sales business."""
10
  }]
11
 
12
  def call_openai_api(messages):
 
22
  messages.append({"role": "assistant", "content": ChatGPT_reply})
23
  return ChatGPT_reply, messages
24
 
25
+ def wrapped_chat_gpt(situation_description):
26
  messages = initial_messages.copy()
27
+ user_input = f"I'm facing a situation in my real estate business: {situation_description}. What guidance and recommendations do you have for handling this?"
28
  reply, updated_messages = CustomChatGPT(user_input, messages)
29
  return reply
30
 
31
  demo = gradio.Interface(
32
  fn=wrapped_chat_gpt,
33
  inputs=[
34
+ gradio.inputs.Textbox(label="Describe the Situation", placeholder="E.g., How do I handle a buyer who's hesitant due to market volatility?"),
 
35
  ],
36
  outputs="text",
37
+ title="Real Estate Coaching Assistant",
38
+ description="A digital assistant powered by insights from top real estate coaches. Get guidance and recommendations for various scenarios in the real estate sales business."
39
  )
40
 
41
  demo.launch(inline=False)