Spaces:
Sleeping
Sleeping
File size: 594 Bytes
7989b0a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
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)
|