Bhh / app.py
Docfile's picture
Update app.py
28cb976
raw
history blame
863 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.ChatgptAi,
)
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()