Bhh / app.py
kuro223's picture
'h'
7bc90c8
raw
history blame contribute delete
858 Bytes
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()