import gradio as gr with open("cv.txt", "r") as f: resume_text = f.read() def answer_question(question): # Simple logic: search for keyword in CV lower_q = question.lower() for line in resume_text.split("\n"): if any(word in line.lower() for word in lower_q.split()): return f"📄 From my CV: {line}" return "🙇 Sorry, I couldn't find a match in my resume." iface = gr.Interface(fn=answer_question, inputs="text", outputs="text", title="Chat with My Resume 🤖", description="Ask me about my experience, skills, or education.") iface.launch()