Spaces:
Runtime error
Runtime error
import gradio as gr | |
from transformers import pipeline | |
# Load the model | |
pipe = pipeline("text-classification", model="Qwen/Qwen2.5-Math-PRM-72B", trust_remote_code=True) | |
# Define a function to generate responses | |
def generate_response(prompt): | |
output = pipe(prompt) | |
return output[0]['label'] | |
# Create a Gradio interface | |
iface = gr.Interface( | |
fn=generate_response, | |
inputs="text", | |
outputs="text", | |
title="Qwen2.5 Math Model", | |
description="Ask a math question and get an answer!" | |
) | |
# Launch the interface | |
iface.launch() |