the files
Browse files- __pycache__/agents.cpython-312.pyc +0 -0
- __pycache__/tasks.cpython-312.pyc +0 -0
- app.py +12 -5
__pycache__/agents.cpython-312.pyc
ADDED
|
Binary file (1.73 kB). View file
|
|
|
__pycache__/tasks.cpython-312.pyc
ADDED
|
Binary file (2.3 kB). View file
|
|
|
app.py
CHANGED
|
@@ -10,13 +10,20 @@ st.set_page_config(page_title="HR Solutions Generator", page_icon="👥")
|
|
| 10 |
# Default model
|
| 11 |
MODEL_NAME = "gemma-7b-it"
|
| 12 |
|
|
|
|
| 13 |
@st.cache_resource
|
| 14 |
def initialize_llm(api_key):
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
def extract_text_from_pdf(pdf_file):
|
| 22 |
pdf_reader = PyPDF2.PdfReader(pdf_file)
|
|
|
|
| 10 |
# Default model
|
| 11 |
MODEL_NAME = "gemma-7b-it"
|
| 12 |
|
| 13 |
+
@st.cache_resource
|
| 14 |
@st.cache_resource
|
| 15 |
def initialize_llm(api_key):
|
| 16 |
+
try:
|
| 17 |
+
return ChatGroq(
|
| 18 |
+
model="groq/llama-3.1-8b-instant", # Replace with your desired model
|
| 19 |
+
verbose=True,
|
| 20 |
+
temperature=0.5, # Adjust temperature as needed
|
| 21 |
+
)
|
| 22 |
+
except Exception as e:
|
| 23 |
+
st.error(f"Error during LLM initialization: {e}")
|
| 24 |
+
return None
|
| 25 |
+
|
| 26 |
+
|
| 27 |
|
| 28 |
def extract_text_from_pdf(pdf_file):
|
| 29 |
pdf_reader = PyPDF2.PdfReader(pdf_file)
|