Spaces:
Sleeping
Sleeping
MandarBhalerao
commited on
Commit
·
336013c
1
Parent(s):
0047282
Initial commit
Browse files- .gitignore +1 -1
- app/chains.py +5 -1
.gitignore
CHANGED
@@ -110,7 +110,7 @@ ipython_config.py
|
|
110 |
.pdm.toml
|
111 |
.pdm-python
|
112 |
.pdm-build/
|
113 |
-
|
114 |
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
115 |
__pypackages__/
|
116 |
|
|
|
110 |
.pdm.toml
|
111 |
.pdm-python
|
112 |
.pdm-build/
|
113 |
+
secrets.toml
|
114 |
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
115 |
__pypackages__/
|
116 |
|
app/chains.py
CHANGED
@@ -5,7 +5,9 @@ from langchain_core.output_parsers import JsonOutputParser
|
|
5 |
from langchain_core.exceptions import OutputParserException
|
6 |
from dotenv import load_dotenv
|
7 |
|
|
|
8 |
|
|
|
9 |
|
10 |
# using this we can have a file called .env in your root folder where you can keep your API key.
|
11 |
load_dotenv() # This will find the .env file and it will set the things in that file as your environment variable
|
@@ -14,7 +16,9 @@ load_dotenv() # This will find the .env file and it will set the things in tha
|
|
14 |
|
15 |
class Chain:
|
16 |
def __init__(self):
|
17 |
-
self.llm = ChatGroq(temperature=0, groq_api_key=
|
|
|
|
|
18 |
|
19 |
# function for extracting the job description and then passing it to a json parser to convert it to json
|
20 |
def extract_jobs(self, cleaned_text):
|
|
|
5 |
from langchain_core.exceptions import OutputParserException
|
6 |
from dotenv import load_dotenv
|
7 |
|
8 |
+
import streamlit as st
|
9 |
|
10 |
+
GROQ_API_KEY = st.secrets["default"]["GROQ_API_KEY"]
|
11 |
|
12 |
# using this we can have a file called .env in your root folder where you can keep your API key.
|
13 |
load_dotenv() # This will find the .env file and it will set the things in that file as your environment variable
|
|
|
16 |
|
17 |
class Chain:
|
18 |
def __init__(self):
|
19 |
+
self.llm = ChatGroq(temperature=0, groq_api_key=GROQ_API_KEY, model_name="llama-3.1-70b-versatile")
|
20 |
+
# self.llm = ChatGroq(temperature=0, groq_api_key=os.getenv("GROQ_API_KEY"), model_name="llama-3.1-70b-versatile")
|
21 |
+
|
22 |
|
23 |
# function for extracting the job description and then passing it to a json parser to convert it to json
|
24 |
def extract_jobs(self, cleaned_text):
|