Spaces:
Sleeping
Sleeping
Michael commited on
Upload folder using huggingface_hub
Browse files78 unmodified lines79808182838485868788899040 unmodified lines13113213313413513613713878 unmodified linesdef __init__(self):self.openai = OpenAI()self.name = "Michael Afolami"reader = PdfReader("me/Linkedin_Maf.pdf", "cv.pdf")self.profile = ""for page in reader.pages:text = page.extract_text()if text:self.profile += textwith open("me/summary.txt", "r", encoding="utf-8") as f:self.summary = f.read()40 unmodified linesif __name__ == "__main__":me = Me()textbox=gr.Textbox(placeholder="Describe your project workflow or the issues you're facing...",lines=3)gr.ChatInterface(me.chat, type="messages").launch()78 unmodified lines798081828384858687888990919293949540 unmodified lines13613713813914078 unmodified linesdef __init__(self):self.openai = OpenAI()self.name = "Michael Afolami"self.profile = ""pdf_paths = ["me/Linkedin_Maf.pdf", "cv.pdf"]for path in pdf_paths:reader = PdfReader(path)for page in reader.pages:text = page.extract_text()if text:self.profile += text + "\n"with open("me/summary.txt", "r", encoding="utf-8") as f:self.summary = f.read()40 unmodified linesif __name__ == "__main__":me = Me()gr.ChatInterface(me.chat, type="messages", textbox=gr.Textbox(placeholder="What would you like to ask about Michael Afolami?")).launch()
app.py+11-9