philliewo commited on
Commit
5399cd6
·
verified ·
1 Parent(s): c06bb62

Upload folder using huggingface_hub

Browse files
Files changed (2) hide show
  1. 4_lab4.ipynb +7 -15
  2. app.py +8 -1
4_lab4.ipynb CHANGED
@@ -323,7 +323,7 @@
323
  },
324
  {
325
  "cell_type": "code",
326
- "execution_count": 18,
327
  "metadata": {},
328
  "outputs": [
329
  {
@@ -342,9 +342,9 @@
342
  " if text:\n",
343
  " linkedin += text\n",
344
  "\n",
345
- "reader = PdfReader(\"me/resume.pdf\")\n",
346
  "resume = \"\"\n",
347
- "for page in reader.pages:\n",
348
  " text = page.extract_text()\n",
349
  " if text:\n",
350
  " resume += text\n",
@@ -411,21 +411,21 @@
411
  },
412
  {
413
  "cell_type": "code",
414
- "execution_count": null,
415
  "metadata": {},
416
  "outputs": [
417
  {
418
  "name": "stdout",
419
  "output_type": "stream",
420
  "text": [
421
- "* Running on local URL: http://127.0.0.1:7860\n",
422
  "* To create a public link, set `share=True` in `launch()`.\n"
423
  ]
424
  },
425
  {
426
  "data": {
427
  "text/html": [
428
- "<div><iframe src=\"http://127.0.0.1:7860/\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
429
  ],
430
  "text/plain": [
431
  "<IPython.core.display.HTML object>"
@@ -438,17 +438,9 @@
438
  "data": {
439
  "text/plain": []
440
  },
441
- "execution_count": 21,
442
  "metadata": {},
443
  "output_type": "execute_result"
444
- },
445
- {
446
- "name": "stdout",
447
- "output_type": "stream",
448
- "text": [
449
- "Tool called: record_user_details\n",
450
- "Push: Recording interest from Jen with email [email protected] and notes Interested in getting in touch.\n"
451
- ]
452
  }
453
  ],
454
  "source": [
 
323
  },
324
  {
325
  "cell_type": "code",
326
+ "execution_count": null,
327
  "metadata": {},
328
  "outputs": [
329
  {
 
342
  " if text:\n",
343
  " linkedin += text\n",
344
  "\n",
345
+ "reader2 = PdfReader(\"me/resume.pdf\")\n",
346
  "resume = \"\"\n",
347
+ "for page in reader2.pages:\n",
348
  " text = page.extract_text()\n",
349
  " if text:\n",
350
  " resume += text\n",
 
411
  },
412
  {
413
  "cell_type": "code",
414
+ "execution_count": 22,
415
  "metadata": {},
416
  "outputs": [
417
  {
418
  "name": "stdout",
419
  "output_type": "stream",
420
  "text": [
421
+ "* Running on local URL: http://127.0.0.1:7862\n",
422
  "* To create a public link, set `share=True` in `launch()`.\n"
423
  ]
424
  },
425
  {
426
  "data": {
427
  "text/html": [
428
+ "<div><iframe src=\"http://127.0.0.1:7862/\" width=\"100%\" height=\"500\" allow=\"autoplay; camera; microphone; clipboard-read; clipboard-write;\" frameborder=\"0\" allowfullscreen></iframe></div>"
429
  ],
430
  "text/plain": [
431
  "<IPython.core.display.HTML object>"
 
438
  "data": {
439
  "text/plain": []
440
  },
441
+ "execution_count": 22,
442
  "metadata": {},
443
  "output_type": "execute_result"
 
 
 
 
 
 
 
 
444
  }
445
  ],
446
  "source": [
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  from dotenv import load_dotenv
2
  from openai import OpenAI
3
  import json
@@ -77,13 +78,19 @@ class Me:
77
 
78
  def __init__(self):
79
  self.openai = OpenAI()
80
- self.name = "Ed Donner"
81
  reader = PdfReader("me/linkedin.pdf")
82
  self.linkedin = ""
83
  for page in reader.pages:
84
  text = page.extract_text()
85
  if text:
86
  self.linkedin += text
 
 
 
 
 
 
87
  with open("me/summary.txt", "r", encoding="utf-8") as f:
88
  self.summary = f.read()
89
 
 
1
+
2
  from dotenv import load_dotenv
3
  from openai import OpenAI
4
  import json
 
78
 
79
  def __init__(self):
80
  self.openai = OpenAI()
81
+ self.name = "Filipa Lobão"
82
  reader = PdfReader("me/linkedin.pdf")
83
  self.linkedin = ""
84
  for page in reader.pages:
85
  text = page.extract_text()
86
  if text:
87
  self.linkedin += text
88
+ reader2 = PdfReader("me/resume.pdf")
89
+ self.resume = ""
90
+ for page in reader2.pages:
91
+ text = page.extract_text()
92
+ if text:
93
+ self.resume += text
94
  with open("me/summary.txt", "r", encoding="utf-8") as f:
95
  self.summary = f.read()
96