Update app.py
Browse files
app.py
CHANGED
@@ -6,16 +6,19 @@ def chatbot_interaction(input_text):
|
|
6 |
print(input_text)
|
7 |
response = g4f.ChatCompletion.create(
|
8 |
model="gpt-4",
|
9 |
-
provider=g4f.Provider.
|
10 |
messages=[{"role": "user", "content": input_texxt}],
|
11 |
-
stream=
|
12 |
)
|
|
|
13 |
Q = ""
|
14 |
for message in response:
|
15 |
print(message, flush=True, end='')
|
16 |
Q += message
|
17 |
print(Q)
|
18 |
return Q
|
|
|
|
|
19 |
iface = gr.Interface(
|
20 |
fn=chatbot_interaction,
|
21 |
inputs="text",
|
|
|
6 |
print(input_text)
|
7 |
response = g4f.ChatCompletion.create(
|
8 |
model="gpt-4",
|
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",
|