File size: 741 Bytes
c6694ef
 
 
 
7f27daa
 
7087217
7f27daa
c6694ef
 
 
 
 
 
 
 
 
 
 
 
c1a6070
7f27daa
c6694ef
7f27daa
c6694ef
7087217
c6694ef
7f27daa
c6694ef
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
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,
    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()