File size: 858 Bytes
0e3ca79
e1d3da4
f2721d4
 
7d90907
7b3f9e2
 
 
46405c5
3c47b1b
 
 
 
 
 
 
 
 
3137285
3c47b1b
 
 
 
 
 
 
d6ba4fe
3c47b1b
0e3ca79
3c47b1b
0e3ca79
ae16a6d
4044870
d4d01f8
0e3ca79
01813ce
7d90907
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 gradio as gr

#
# supporte args

# Automatic selection of provider

# streamed completion

from g4f import Provider, models
from langchain.llms.base import LLM

from langchain_g4f import G4FLLM


def main(input_text):
    llm: LLM = G4FLLM(
        model=models.gpt_35_turbo,
        provider=Provider.GPTalk,
    )
    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("Question:", input_text)
    print() 
    print()
    res = llm(input_texxt)
    print(res)  # Hello! How can I assist you today?
    return res

iface = gr.Interface(
    fn=main,
    inputs="text",
    outputs=gr.Textbox(label="Réponse"),
    title="bot",
    description="By Isa Ibn Maryam.  😂😂 Vas dormir ! Espace fermé ! ")

iface.launch()