|
import gradio as gr |
|
import g4f |
|
|
|
def chatbot_interaction(input_text): |
|
user = " Tu es un assistant intelligent.ton but est d'assiter au mieux que tu peux. tu as ete creer par le docteur Traore." |
|
print(input_text) |
|
response = g4f.ChatCompletion.create(model='gpt-3.5-turbo', provider=g4f.Provider.Aichat, messages=[ |
|
{"role": "user", "content":input_text}], stream=False ) |
|
|
|
print(response) |
|
return response |
|
iface = gr.Interface( |
|
fn=chatbot_interaction, |
|
inputs="text", |
|
outputs=gr.Textbox(label="Réponse"), |
|
title="bot", |
|
description="By Isa Ibn Maryam. Dis moi tu viens encore fais quoi ici ? 😂😂 Vas dormir ! Espace fermé ! ") |
|
|
|
iface.launch() |