File size: 581 Bytes
5900202
 
fc0d268
 
 
5900202
 
fc0d268
5900202
 
fc0d268
5900202
fc0d268
 
 
5900202
 
fc0d268
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
import gradio as gr

def evaluate_code(question, code):
    # Dummy response (Replace with TinyLlama AI evaluation)
    return "This code is correct and follows best practices."

iface = gr.Interface(
    fn=evaluate_code,
    inputs=[
        gr.Textbox(lines=2, placeholder="Enter the problem question here..."),
        gr.Code(language="python", placeholder="Write your code here...")
    ],
    outputs=gr.Textbox(label="Evaluation Result"),
    title="Code Evaluator",
    description="Enter a coding question and your solution to get AI-powered feedback."
)

iface.launch()