Spaces:
Build error
Build error
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
+
from utils import load_courses, recommend_course
|
| 3 |
+
|
| 4 |
+
courses = load_courses()
|
| 5 |
+
|
| 6 |
+
def optimize_course(field):
|
| 7 |
+
return recommend_course(field, courses)
|
| 8 |
+
|
| 9 |
+
iface = gr.Interface(
|
| 10 |
+
fn=optimize_course,
|
| 11 |
+
inputs=gr.Textbox(label="Enter your field or topic"),
|
| 12 |
+
outputs=gr.Markdown(label="Top Recommended Course(s)"),
|
| 13 |
+
title="📚 Course Optimizer Bot",
|
| 14 |
+
description="Enter a topic (e.g., Python, AI, Web Dev) and get the best-rated course with summarized reviews."
|
| 15 |
+
)
|
| 16 |
+
|
| 17 |
+
iface.launch()
|