Ret / app.py
Docfile's picture
Update app.py
5f5016a
raw
history blame contribute delete
745 Bytes
import g4f
import gradio as gr
import nest_asyncio
nest_asyncio.apply()
# Connexion à la
import g4f
g4f.debug.logging = True # Enable logging
g4f.check_version = False # Disable automatic version checking
print(g4f.version) # Check version
print(g4f.Provider.Ails.params) # Supported args
def rr(i):
response = g4f.ChatCompletion.create(
model=g4f.models.gpt_35_turbo_16k,
messages=[{"role": "user", "content": i}],
) # Alternative model setting
return response
iface = gr.Interface(
fn=rr,
inputs=gr.Textbox(label="Question:", lines=4),
outputs=gr.Textbox(label="Réponse"),
title="bot",
description="By Isa Ibn Maryam. 😂😂 Vas dormir ! Espace fermé ! ")
iface.launch()