Spaces:
Sleeping
Sleeping
| import gradio as gr | |
| import requests | |
| import io | |
| from PIL import Image | |
| import random | |
| import os | |
| HF_TOKEN = os.getenv("HF_TOKEN") | |
| SOFIA_DATA = { | |
| "nombre": "Sofía Rivera", | |
| "personalidad": "Influencer fitness elite", | |
| "mascota": "Copito", | |
| "frases_fallback": ["¡Hola!"] | |
| } | |
| def chat_engine(message, history): | |
| return "¡Hola! Soy Sofía Rivera. ✨" | |
| with gr.Blocks() as app: | |
| gr.Markdown("# 👑 SOFÍA RIVERA") | |
| with gr.Tab("💬 Chat"): | |
| chat = gr.Chatbot() | |
| txt = gr.Textbox() | |
| txt.submit(lambda m, h: h + [(m, chat_engine(m, h))], [txt, chat], [chat]) | |
| if __name__ == "__main__": | |
| app.launch() | |