Update app.py
Browse files
app.py
CHANGED
@@ -13,9 +13,9 @@ def chatbot_interaction(input_text):
|
|
13 |
print("Question:", input_text)
|
14 |
response = g4f.ChatCompletion.create(
|
15 |
model="gpt-3.5-turbo",
|
16 |
-
provider=g4f.Provider.
|
17 |
messages=[{"role": "user", "content": input_texxt}],
|
18 |
-
stream=
|
19 |
)
|
20 |
print()
|
21 |
print()
|
@@ -24,13 +24,13 @@ def chatbot_interaction(input_text):
|
|
24 |
print()
|
25 |
print()
|
26 |
print()
|
27 |
-
|
28 |
Q = ""
|
29 |
for message in response:
|
30 |
print(message, flush=True, end='')
|
31 |
Q += message
|
32 |
-
|
33 |
-
return
|
34 |
iface = gr.Interface(
|
35 |
fn=chatbot_interaction,
|
36 |
inputs="text",
|
|
|
13 |
print("Question:", input_text)
|
14 |
response = g4f.ChatCompletion.create(
|
15 |
model="gpt-3.5-turbo",
|
16 |
+
provider=g4f.Provider.Aivvm,
|
17 |
messages=[{"role": "user", "content": input_texxt}],
|
18 |
+
stream=True,
|
19 |
)
|
20 |
print()
|
21 |
print()
|
|
|
24 |
print()
|
25 |
print()
|
26 |
print()
|
27 |
+
|
28 |
Q = ""
|
29 |
for message in response:
|
30 |
print(message, flush=True, end='')
|
31 |
Q += message
|
32 |
+
|
33 |
+
return Q
|
34 |
iface = gr.Interface(
|
35 |
fn=chatbot_interaction,
|
36 |
inputs="text",
|