Spaces:
Sleeping
Sleeping
File size: 692 Bytes
db692a2 e403771 db692a2 4556e03 db692a2 360cf70 db692a2 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
import gradio as gr
def evaluar_prompt(prompt):
# Simple logic to return the prompt and a static score
return f"Evaluating prompt: {prompt}", 85
def interfaz():
with gr.Blocks() as demo:
prompt_input = gr.Textbox(label="Escribe tu prompt aquí:")
feedback_output = gr.Textbox(label="Retroalimentación:", interactive=False)
calificacion_output = gr.Number(label="Calificación Final:", interactive=False)
evaluar_button = gr.Button("Evaluar Prompt")
evaluar_button.click(evaluar_prompt, inputs=prompt_input, outputs=[feedback_output, calificacion_output])
return demo
# Run the interface
demo = interfaz()
demo.launch() |