Docfile commited on
Commit
22d748a
·
1 Parent(s): bfa5a05

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -6,19 +6,18 @@ def chatbot_interaction(input_text):
6
  print(input_text)
7
  response = g4f.ChatCompletion.create(
8
  model="gpt-3.5-turbo",
9
- provider=g4f.Provider.AItianhu,
10
  messages=[{"role": "user", "content": input_texxt}],
11
- stream=False,
12
  )
13
- """
14
  Q = ""
15
  for message in response:
16
  print(message, flush=True, end='')
17
  Q += message
18
  print(Q)
19
  return Q
20
- """
21
- return response
22
  iface = gr.Interface(
23
  fn=chatbot_interaction,
24
  inputs="text",
 
6
  print(input_text)
7
  response = g4f.ChatCompletion.create(
8
  model="gpt-3.5-turbo",
9
+ provider=g4f.Provider.Acytoo,
10
  messages=[{"role": "user", "content": input_texxt}],
11
+ stream=True,
12
  )
13
+
14
  Q = ""
15
  for message in response:
16
  print(message, flush=True, end='')
17
  Q += message
18
  print(Q)
19
  return Q
20
+
 
21
  iface = gr.Interface(
22
  fn=chatbot_interaction,
23
  inputs="text",