Ret / app.py
Docfile's picture
Create app.py
c6694ef
raw
history blame
736 Bytes
import g4f
import gradio as gr
import nest_asyncio
nest_asyncio.apply()
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):
# Normal response
response = g4f.ChatCompletion.create(
model=g4f.models.gpt_35_turbo,
messages=[{"role": "user", "content": "Hello"}],
) # 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()