abhicodes commited on
Commit
6748f03
·
verified ·
1 Parent(s): 1e854b0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -9
app.py CHANGED
@@ -75,10 +75,10 @@ with gr.Blocks(theme=theme) as Alzheimer:
75
 
76
  def respond(message, history):
77
  bot_message = g4f.ChatCompletion.create(
78
- model="gpt-3.5-turbo",
79
- provider=g4f.Provider.You,
80
  messages=[{"role": "user",
81
- "content": "Your role is Alzheimer Disease Expert. Now I will provide you with the user query. First check if the user query is related to Alzheimer or not. If it is not related to Alzheimer then do not reply the query whereas if related to Alzheimer reply it as usual. Here's the user Query:" + message}],
82
  )
83
  time.sleep(1)
84
  return str(bot_message)
@@ -110,10 +110,10 @@ with gr.Blocks(theme=theme) as BreastCancer:
110
 
111
  def respond(message, history):
112
  bot_message = g4f.ChatCompletion.create(
113
- model="gpt-3.5-turbo",
114
- provider=g4f.Provider.You,
115
  messages=[{"role": "user",
116
- "content": "Your role is Breast_Cancer Disease Expert. Now I will provide you with the user query. First check if the user query is related to Breast_Cancer or not. If it is not related to Breast_Cancer then do not reply the query whereas if related to Breast_Cancer reply it as usual. Here's the user Query:" + message}],
117
  )
118
  time.sleep(1)
119
  yield str(bot_message)
@@ -144,10 +144,10 @@ with gr.Blocks(theme=theme) as BrainTumor:
144
 
145
  def respond(message, history):
146
  bot_message = g4f.ChatCompletion.create(
147
- model="gpt-3.5-turbo",
148
- provider=g4f.Provider.GptGo,
149
  messages=[{"role": "user",
150
- "content": "Your role is Brain Tumor Disease Expert. Now I will provide you with the user query. First check if the user query is related to Brain Tumor or not. If it is not related to Brain Tumor then do not reply the query whereas if related to Brain Tumor reply it as usual. Here's the user Query:" + message}],
151
  )
152
  time.sleep(1)
153
  return str(bot_message)
 
75
 
76
  def respond(message, history):
77
  bot_message = g4f.ChatCompletion.create(
78
+ model="gpt-4-32k-0613",
79
+ provider=g4f.Provider.GeekGpt,
80
  messages=[{"role": "user",
81
+ "content": "Your role is Alzheimer Disease Expert. Now I will provide you with the user query. First check if the user query is related to Alzheimer or not. If it is not related to Alzheimer then simply avoid the query by saying this is not my expertise, whereas if related to Alzheimer reply it as usual. Here's the user Query:" + message}],
82
  )
83
  time.sleep(1)
84
  return str(bot_message)
 
110
 
111
  def respond(message, history):
112
  bot_message = g4f.ChatCompletion.create(
113
+ model="gpt-4-32k-0613",
114
+ provider=g4f.Provider.GeekGpt,
115
  messages=[{"role": "user",
116
+ "content": "Your role is Breast_Cancer Disease Expert. Now I will provide you with the user query. First check if the user query is related to Breast_Cancer or not. If it is not related to Breast_Cancer then simply avoid the query by saying this is not my expertise, whereas if related to Breast_Cancer reply it as usual. Here's the user Query:" + message}],
117
  )
118
  time.sleep(1)
119
  yield str(bot_message)
 
144
 
145
  def respond(message, history):
146
  bot_message = g4f.ChatCompletion.create(
147
+ model="gpt-4-32k-0613",
148
+ provider=g4f.Provider.GeekGpt,
149
  messages=[{"role": "user",
150
+ "content": "Your role is Brain Tumor Disease Expert. Now I will provide you with the user query. First check if the user query is related to Brain Tumor or not. If it is not related to Brain Tumor then simply avoid the query by saying this is not my expertise, whereas if related to Brain Tumor reply it as usual. Here's the user Query:" + message}],
151
  )
152
  time.sleep(1)
153
  return str(bot_message)