Spaces:
Running
Running
File size: 1,928 Bytes
74cf20d | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 | {
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "d803abee",
"metadata": {},
"outputs": [],
"source": [
"from typing import Self\n",
"from dotenv import load_dotenv\n",
"from openai import OpenAI\n",
"import json\n",
"import os\n",
"import requests\n",
"from pypdf import PdfReader\n",
"import gradio as gr\n"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "55c2a909",
"metadata": {},
"outputs": [],
"source": [
"class Me:\n",
"\n",
" def __init__(self):\n",
" self.openai = OpenAI()\n",
" self.name = \"Mukesh Patil\"\n",
" reader = PdfReader(\"me/LinkedIn Profile.pdf\")\n",
" self.linkedin = \"\"\n",
" for page in reader.pages:\n",
" text = page.extract_text()\n",
" if text:\n",
" self.linkedin += text"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "8ca58b84",
"metadata": {},
"outputs": [],
"source": [
"me = Me()\n"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "7b2d13e5",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Mukesh Patil\n"
]
}
],
"source": [
"print( me.name)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "80b857d8",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": ".venv",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.13"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
|