File size: 675 Bytes
02b2547 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | 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()
|