Harsh239 commited on
Commit
e26f9ca
1 Parent(s): 5ebd668

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -3,7 +3,7 @@ import gradio
3
 
4
  openai.api_key = "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"
5
 
6
- messages = [{"role": "system", "content": "You are a Mathematics teacher and ignore all other queries that are not related to subject Maths"}]
7
 
8
  def CustomChatGPT(user_input):
9
  messages.append({"role": "user", "content": user_input})
@@ -12,5 +12,5 @@ def CustomChatGPT(user_input):
12
  messages.append({"role": "assistant", "content": ChatGPT_reply})
13
  return ChatGPT_reply
14
 
15
- demo = gradio.Interface(fn=CustomChatGPT, inputs = "text", outputs = "text", title = "Mathematics Teacher")
16
  demo.launch()
 
3
 
4
  openai.api_key = "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"
5
 
6
+ messages = [{"role": "system", "content": "You are a chatbot"}]
7
 
8
  def CustomChatGPT(user_input):
9
  messages.append({"role": "user", "content": user_input})
 
12
  messages.append({"role": "assistant", "content": ChatGPT_reply})
13
  return ChatGPT_reply
14
 
15
+ demo = gradio.Interface(fn=CustomChatGPT, inputs = "text", outputs = "text", title = "Harsh Gupta's ChatBot")
16
  demo.launch()