OdinStef commited on
Commit
a631f97
·
1 Parent(s): a601482

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -1,5 +1,9 @@
 
1
  import gradio as gr
2
 
 
 
 
3
 
4
  def CustomChatGPT(user_input):
5
  messages.append({"role": "user", "content": enter_input_here})
@@ -10,6 +14,7 @@ def CustomChatGPT(user_input):
10
  ChatGPT_reply = response["choices"][0]["message"]["content"]
11
  messages.append({"role": "assistant", "content": ChatGPT_reply})
12
  return ChatGPT_reply
13
-
14
- iface = gr.Interface(fn=greet, inputs="text", outputs="text")
15
- iface.launch(share=True)
 
 
1
+ import openai
2
  import gradio as gr
3
 
4
+ openai.api_key = "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"
5
+
6
+ messages = [{"role": "system", "content": "You are a financial experts that specializes in real estate investment and negotiation"}]
7
 
8
  def CustomChatGPT(user_input):
9
  messages.append({"role": "user", "content": enter_input_here})
 
14
  ChatGPT_reply = response["choices"][0]["message"]["content"]
15
  messages.append({"role": "assistant", "content": ChatGPT_reply})
16
  return ChatGPT_reply
17
+
18
+ demo = gradio.Interface(fn=CustomChatGPT, inputs = "text", outputs = "text", title = "Real Estate Pro")
19
+
20
+ demo.launch(share=True)