Update app.py
Browse files
app.py
CHANGED
|
@@ -15,7 +15,7 @@ def chatbot_interaction(input_text):
|
|
| 15 |
model="gpt-3.5-turbo",
|
| 16 |
provider=g4f.Provider.ChatBase,
|
| 17 |
messages=[{"role": "user", "content": input_texxt}],
|
| 18 |
-
stream=
|
| 19 |
)
|
| 20 |
print()
|
| 21 |
print()
|
|
@@ -24,14 +24,14 @@ 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 |
print(Q)
|
| 33 |
-
|
| 34 |
-
return
|
| 35 |
iface = gr.Interface(
|
| 36 |
fn=chatbot_interaction,
|
| 37 |
inputs="text",
|
|
|
|
| 15 |
model="gpt-3.5-turbo",
|
| 16 |
provider=g4f.Provider.ChatBase,
|
| 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 |
print(Q)
|
| 33 |
+
|
| 34 |
+
return Q
|
| 35 |
iface = gr.Interface(
|
| 36 |
fn=chatbot_interaction,
|
| 37 |
inputs="text",
|