MarcosFRGames commited on
Commit
e2d4608
·
verified ·
1 Parent(s): 78f8319

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -26
app.py CHANGED
@@ -5,6 +5,7 @@ import time
5
  from llama_cpp import Llama
6
  import requests
7
  import tempfile
 
8
 
9
  app = Flask(__name__)
10
  logging.basicConfig(level=logging.INFO)
@@ -12,32 +13,8 @@ logging.basicConfig(level=logging.INFO)
12
  MAX_CONTEXT_TOKENS = 1024 * 8
13
  MAX_GENERATION_TOKENS = 1024 * 4
14
 
15
- MODELS = [
16
- {
17
- "url": "https://huggingface.co/Novaciano/Qwen2.5-1.5B-NSFW_Amoral_Christmas-GGUF/resolve/main/Qwen2.5-1.5b-NSFW_Amoral_Christmas.gguf",
18
- "name": "qwen2.5-1.5b-nsfw-amoral-christmas"
19
- },
20
- {
21
- "url": "https://huggingface.co/Qwen/Qwen2.5-Coder-1.5B-Instruct-GGUF/resolve/main/qwen2.5-coder-1.5b-instruct-q4_k_m.gguf",
22
- "name": "qwen2.5-coder-1.5b-instruct"
23
- },
24
- {
25
- "url": "https://huggingface.co/Qwen/Qwen2.5-3B-Instruct-GGUF/resolve/main/qwen2.5-3b-instruct-q4_k_m.gguf",
26
- "name": "qwen2.5-3b-instruct"
27
- },
28
- {
29
- "url": "https://huggingface.co/PurpleAILAB/Llama-3.2-3B-Instruct-uncensored-LoRA_final-Q4_K_M-GGUF/resolve/main/unsloth.Q4_K_M.gguf",
30
- "name": "llama-3.2-3b-instruct-uncensored-lora"
31
- },
32
- {
33
- "url": "https://huggingface.co/itlwas/Hermes-3-Llama-3.2-3B-Q4_K_M-GGUF/resolve/main/hermes-3-llama-3.2-3b-q4_k_m.gguf",
34
- "name": "hermes-3-llama-3.2-3b"
35
- },
36
- {
37
- "url": "https://huggingface.co/Novaciano/Uncensored-1b-Creative_Writing_RP-GGUF/resolve/main/Uncensored-1b-Creative_Writing_RP.gguf",
38
- "name": "uncensored-1b-creative-writing-rp"
39
- }
40
- ]
41
 
42
  class LLMManager:
43
  def __init__(self, models_config):
 
5
  from llama_cpp import Llama
6
  import requests
7
  import tempfile
8
+ import json
9
 
10
  app = Flask(__name__)
11
  logging.basicConfig(level=logging.INFO)
 
13
  MAX_CONTEXT_TOKENS = 1024 * 8
14
  MAX_GENERATION_TOKENS = 1024 * 4
15
 
16
+ with open('engines.json', 'r') as f:
17
+ MODELS = json.load(f)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
18
 
19
  class LLMManager:
20
  def __init__(self, models_config):