Spaces:
Running on Zero
Running on Zero
Download config.py from will123654/cvchatbot: direct link, hf CLI and curl.
- Browser
- Download file 1.68 kB
-
https://huggingface.co/spaces/will123654/cvchatbot/resolve/main/config.py
- Command line
-
hf download hf://spaces/will123654/cvchatbot/config.py
-
curl -L -o config.py https://huggingface.co/spaces/will123654/cvchatbot/resolve/main/config.py
1.68 kB
| import os | |
| from string import Template | |
| HF_TOKEN = os.getenv('HF_TOKEN') | |
| # model configs | |
| LLM_ID = "google/gemma-3-4b-it" if os.getenv("ENV") == "PROD" else "google/gemma-3-1b-it" | |
| EMBEDDING_MODEL_ID = "google/embeddinggemma-300M" | |
| # embedding parameters | |
| DOMAIN_SELECTION_THRESHOLD = 0.5 | |
| DOCUMENT_SELECTION_THRESHOLD = 0.2 | |
| DOCUMENT_FOLLOWUP_THRESHOLD = 0.5 | |
| # generation parameters | |
| RESPONSE_MAX_NEW_TOKENS = 512 | |
| RESPONSE_SAMPLING_TOP_P = 0.95 | |
| RESPONSE_SAMPLING_TEMPERATURE = 0.7 | |
| # cv document data files | |
| CV_DATA_GCS_BUCKET = "wlee-jsons" | |
| CV_DATA_DIRNAME = "cvdata/" | |
| CV_DATA_FILE_EDUCATION = "education.json" | |
| CV_DATA_FILE_JOBS = "jobs.json" | |
| CV_DATA_FILE_PAPERS = "papers.json" | |
| CV_DATA_FILE_SKILLS = "skills.json" | |
| RESET_QUERY = "restart chat" | |
| # text configs | |
| PERSON_NAME = "William" | |
| PERSON_PRONOUN = "he" | |
| PERSON_PRONOUN_POSSESSIVE = "his" | |
| WELCOME_MESSAGE_TEMPLATE = Template(f"Hi! I'm {PERSON_NAME}'s Career Assistant. I can answer questions you might have regarding {PERSON_PRONOUN_POSSESSIVE} resume. " | |
| "To start, tell me which one of the following domains you would like to focus on:\n" | |
| "$domains\n" | |
| f"At any point in chat, say \'{RESET_QUERY}\' to reset chat and return to current state.") | |
| NO_MATCH_RESPONSE = "I don't have that specific information right now." | |
| EDUCATION_DESCRIPTION = "Academic degrees and relevant coursework" | |
| JOBS_DESCRIPTION = "Work experience" | |
| PAPERS_DESCRIPTION = "Papers and publications" | |
| SKILLS_DESCRIPTION = "Technical skills, such as programming language, framework, and tools" | |
| JOB_TYPES = [ | |
| "Software Engineer", | |
| "Research Intern", | |
| ] | |
| # cache files | |
| KNOWLEDGE_CACHE_FILE = "knowledge.pkl" |