BeTaLabs commited on
Commit
78d99a8
1 Parent(s): c8ee815

Update params.py

Browse files
Files changed (1) hide show
  1. params.py +28 -5
params.py CHANGED
@@ -1,5 +1,28 @@
1
- #OPENAI_MODEL = "https://huggingface.co/arcee-ai/Arcee-Spark-GGUF/blob/main/Arcee-Spark-IQ4_XS.gguf"
2
- #OPENAI_API_KEY = ""
3
- OUTPUT_FILE_PATH = "./dataset.jsonl"
4
- NUM_WORKERS = 1
5
- PROVIDER = "llamanet"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+
3
+ DEFAULT_PARAMS = {
4
+ 'PROVIDER': 'local-model',
5
+ 'BASE_URL': 'http://localhost:11434/v1',
6
+ 'WORKSPACE': 'mycoworks',
7
+ 'API_KEY': '0MACR41-7804XQB-MGC1GS0-FGSKB44',
8
+ 'OUTPUT_FILE_PATH': './dataset.jsonl',
9
+ 'NUM_WORKERS': 1
10
+ }
11
+
12
+ def load_params():
13
+ try:
14
+ with open('config.json', 'r') as f:
15
+ return json.load(f)
16
+ except FileNotFoundError:
17
+ return DEFAULT_PARAMS
18
+
19
+ def save_params(params):
20
+ with open('config.json', 'w') as f:
21
+ json.dump(params, f, indent=2)
22
+
23
+ # For backwards compatibility
24
+ OPENAI_MODEL = "phi3:latest"
25
+ OPENAI_API_KEY = ""
26
+ OUTPUT_FILE_PATH = DEFAULT_PARAMS['OUTPUT_FILE_PATH']
27
+ NUM_WORKERS = DEFAULT_PARAMS['NUM_WORKERS']
28
+ PROVIDER = DEFAULT_PARAMS['PROVIDER']