Update app.py
Browse files
app.py
CHANGED
@@ -4,15 +4,16 @@ import g4f
|
|
4 |
def chatbot_interaction(input_text):
|
5 |
user = " Tu es un assistant intelligent.ton but est d'assiter au mieux que tu peux. tu as ete creer par le docteur Traore."
|
6 |
print(input_text)
|
7 |
-
response = g4f.ChatCompletion.create(model='gpt-3.5-turbo', provider=g4f.Provider.
|
|
|
8 |
|
9 |
print(response)
|
10 |
return response
|
11 |
iface = gr.Interface(
|
12 |
fn=chatbot_interaction,
|
13 |
inputs="text",
|
14 |
-
outputs=gr.Textbox(label="Réponse"),
|
15 |
title="bot",
|
16 |
-
description="By Isa Ibn Maryam. Dis moi tu viens encore fais quoi ici ? 😂😂 Vas dormir ! Espace fermé ! ")
|
17 |
|
18 |
-
iface.launch()
|
|
|
4 |
def chatbot_interaction(input_text):
|
5 |
user = " Tu es un assistant intelligent.ton but est d'assiter au mieux que tu peux. tu as ete creer par le docteur Traore."
|
6 |
print(input_text)
|
7 |
+
response = g4f.ChatCompletion.create(model='gpt-3.5-turbo', provider=g4f.Provider.Aichat, messages=[
|
8 |
+
{"role": "user", "content":input_text}], stream=False )
|
9 |
|
10 |
print(response)
|
11 |
return response
|
12 |
iface = gr.Interface(
|
13 |
fn=chatbot_interaction,
|
14 |
inputs="text",
|
15 |
+
outputs=gr.Textbox(label="Réponse"),
|
16 |
title="bot",
|
17 |
+
description="By Isa Ibn Maryam. Dis moi tu viens encore fais quoi ici ? 😂😂 Vas dormir ! Espace fermé ! ")
|
18 |
|
19 |
+
iface.launch()
|