ericbegins commited on
Commit
2669fce
·
1 Parent(s): 6926339

Upload folder using huggingface_hub

Browse files
README.md CHANGED
@@ -1,12 +1,6 @@
1
  ---
2
- title: Resume
3
- emoji: 📚
4
- colorFrom: yellow
5
- colorTo: purple
6
  sdk: gradio
7
  sdk_version: 3.34.0
8
- app_file: app.py
9
- pinned: false
10
  ---
11
-
12
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
1
  ---
2
+ title: resume
3
+ app_file: app.py
 
 
4
  sdk: gradio
5
  sdk_version: 3.34.0
 
 
6
  ---
 
 
__pycache__/app.cpython-311.pyc ADDED
Binary file (2.25 kB). View file
 
app.py ADDED
@@ -0,0 +1,38 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from gpt_index import SimpleDirectoryReader, GPTListIndex, GPTSimpleVectorIndex, LLMPredictor, PromptHelper
2
+ from langchain.chat_models import ChatOpenAI
3
+ import gradio as gr
4
+ import sys
5
+ import os
6
+
7
+ os.environ["OPENAI_API_KEY"] = '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'
8
+
9
+ def construct_index(directory_path):
10
+ max_input_size = 4096
11
+ num_outputs = 512
12
+ max_chunk_overlap = 20
13
+ chunk_size_limit = 600
14
+
15
+ prompt_helper = PromptHelper(max_input_size, num_outputs, max_chunk_overlap, chunk_size_limit=chunk_size_limit)
16
+
17
+ llm_predictor = LLMPredictor(llm=ChatOpenAI(temperature=0.7, model_name="gpt-3.5-turbo", max_tokens=num_outputs))
18
+
19
+ documents = SimpleDirectoryReader(directory_path).load_data()
20
+
21
+ index = GPTSimpleVectorIndex(documents, llm_predictor=llm_predictor, prompt_helper=prompt_helper)
22
+
23
+ index.save_to_disk('index.json')
24
+
25
+ return index
26
+
27
+ def chatbot(input_text):
28
+ index = GPTSimpleVectorIndex.load_from_disk('index.json')
29
+ response = index.query(input_text, response_mode="compact")
30
+ return response.response
31
+
32
+ iface = gr.Interface(fn=chatbot,
33
+ inputs=gr.components.Textbox(lines=7, label="Enter your text (for example: 'Would you recommend hiring Eric as a senior software developer?')"),
34
+ outputs="text",
35
+ title="Ask Me Anything about Eric Richardson!")
36
+
37
+ index = construct_index("docs")
38
+ iface.launch(share=True)
docs/Eric Richardson Resume.pdf ADDED
The diff for this file is too large to render. See raw diff
 
docs/other_facts.txt ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ Eric Richardson is originally from Leighton, Alabama.
2
+ Eric Richardson graduated from Colbert County High School in 1992.
3
+ Eric Richardson worked multiple jobs, including taking a full-time job with the University of Alabama Huntsville Research Institute.
4
+ Eric Richardson was born October 5, 1973 at Hellen Keller Hospital in Tuscumbia, AL.
5
+ Eric Richardson is married to Julie Richardson.
6
+ Eric and Julie have 2 daughters.
7
+ Eric Richardson's hobbies are golf, travel, gardening, yard work and learning about the latest technology innovations
8
+ Eric Richardson loves Alabama sports (football, basketball, softball) and is also a big fan of the Philadelphia Eagles and Philadelphia Phillies
9
+ Eric Richardson has also worked at Hardee's, Spencer's Gifts and Blockbuster video while attending school.
10
+ Eric Richardson's favorite movie is "A Few Good Men".
11
+ Eric Richardson loves music and is often referred to as "a human jukebox" due to his encyclopedic knowledge of lyrics across a wide range of genres.
12
+ Eric Richardson's biggest pet peeve is waste - especially wasting time.
13
+
14
+ In 2006, Eric was hired by what was then Digital Fusion (now Kratos Defense). The Missile Defense Data Center had subcontracted out the development of an application to Booz-Allen Hamilton. They moved the development onto the MDDC contract and hired me to finish it out and get it to production. The success of the application lead not only to major growth, but the need for a similar application on a separate, isolated network. Though the applications shared a name, they were completely separate codebases and accomplished different tasks. After over a decade of development on the application, I was chosen to be one of the lead developers on a new project that was to establish a new path ahead, utilizing Agile methods, the latest technologies, DevSecOps and Continuous Integration/Continues Delivery concepts. Subsequent programming teams were to follow our lead and implement the best practices that we determined
index.json ADDED
The diff for this file is too large to render. See raw diff
 
requirements.txt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ gpt_index==0.4.24
2
+ gradio==3.34.0
3
+ langchain==0.0.197