helbot / app.py
helamri's picture
Create app.py
02b2547 verified
raw
history blame contribute delete
675 Bytes
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()