File size: 683 Bytes
4bda4b5
b93778c
4bda4b5
b93778c
4bda4b5
b93778c
 
 
 
18ea130
 
b93778c
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import gradio as gr
from transformers import pipeline

chatbot = pipeline("text-generation", model="mistralai/Mistral-7B-Instruct")

def responder(mensaje, historial):
    respuesta = chatbot(mensaje, max_new_tokens=150)[0]["generated_text"]
    historial.append((mensaje, respuesta))
    return historial, historial

with gr.Blocks() as demo:
    gr.Markdown("# 🤖 Mi IA Online")
    chat = gr.Chatbot()
    entrada = gr.Textbox(placeholder="Escribe aquí…")
    entrada.submit(responder, [entrada, chat], [chat, chat])

# 👇 Aquí agregas tu etiqueta meta
demo.launch(
    head="<meta name='google-site-verification' content='f5P6TlEBCkTQMNMgCsgEtax4J6PxHSP7pf18iPllCVk'>"
)