--- license: mit --- import gradio as gr import json # Ngarko dataset with open("dataset.json", "r") as f: data = json.load(f) def get_recommendation(question): question_lower = question.lower() for item in data: if item["input"].lower() in question_lower: return item["output"] return "Ideja nuk u gjet në dataset. Provo pyetje tjetër 😊" with gr.Blocks() as demo: gr.Markdown("## 🌟 Super AGI Minimal Demo") inp = gr.Textbox(label="Fut pyetjen tënde") out = gr.Textbox(label="Rekomandimi") btn = gr.Button("Merr rekomandim") btn.click(get_recommendation, inputs=inp, outputs=out) demo.launch()