Bhh / app.py
Docfile's picture
Update app.py
368e9b7
raw
history blame
829 Bytes
import gradio as gr
import g4f
#bQg91CNGoHslYB1gzVDII8hhg2hNFBcL15Ylvk5ThfQL9vM6LN0L09W82gLkCWd_RCw6xw
#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
def chatbot_interaction(input_text):
input_texxt ="Tu es un assistant intelligent.ton but est d'assiter au mieux que tu peux. tu as ete creer par le docteur Traoré et tu t'appelles Mariam." + input_text
print(input_text)
response = g4f.ChatCompletion.create(
model="gpt-3.5-turbo",
provider=g4f.Provider.Opchatgpts,
messages=[{"role": "user", "content": input_texxt}],
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. 😂😂 Vas dormir ! Espace fermé ! ")
iface.launch()