Open_AI_o1_Hackathon / pages /coding_challenges.py
Ashar086's picture
Create pages/coding_challenges.py
7989b0a verified
raw
history blame
594 Bytes
import streamlit as st
from components.challenge_eval import evaluate_challenge
from components.feedback import get_ai_feedback
def show_coding_challenges():
st.title("Solve Coding Challenges")
problem = "Implement a linear regression model from scratch."
st.write(f"Problem: {problem}")
user_code = st.text_area("Write your solution here:", height=300)
if st.button("Submit Solution"):
result = evaluate_challenge(user_code)
st.write(result)
if st.button("Get AI Feedback"):
feedback = get_ai_feedback(user_code)
st.write(feedback)