ffreemt commited on
Commit
81e68d1
1 Parent(s): 9314f7d

Update modes/{MODEL_FILENAME}

Browse files
Files changed (1) hide show
  1. app.py +9 -7
app.py CHANGED
@@ -5,6 +5,7 @@
5
  # gradio.load("models/WizardLM/WizardCoder-15B-V1.0").launch()
6
 
7
  import os
 
8
  import time
9
  from dataclasses import asdict, dataclass
10
  from types import SimpleNamespace
@@ -213,18 +214,19 @@ llm = AutoModelForCausalLM.from_pretrained(
213
  )
214
  # """
215
  if "WizardCoder" in MODEL_FILENAME:
 
216
  LLM = AutoModelForCausalLM.from_pretrained(
217
  "TheBloke/WizardCoder-15B-1.0-GGML",
218
- model_file=MODEL_FILENAME,
219
  model_type="starcoder",
220
  threads=os.cpu_count() // 2, # type: ignore
221
  )
222
- LLM = AutoModelForCausalLM.from_pretrained(
223
- "TheBloke/WizardCoder-15B-1.0-GGML",
224
- model_file="",
225
- model_type="starcoder",
226
- threads=os.cpu_count() // 2 # type: ignore
227
- )
228
 
229
  GENERATION_CONFIG = GenerationConfig(
230
  temperature=0.2,
 
5
  # gradio.load("models/WizardLM/WizardCoder-15B-V1.0").launch()
6
 
7
  import os
8
+ from pathlib import Path
9
  import time
10
  from dataclasses import asdict, dataclass
11
  from types import SimpleNamespace
 
214
  )
215
  # """
216
  if "WizardCoder" in MODEL_FILENAME:
217
+ _ = Path("models", MODEL_FILENAME).absolute().as_posix()
218
  LLM = AutoModelForCausalLM.from_pretrained(
219
  "TheBloke/WizardCoder-15B-1.0-GGML",
220
+ model_file=_,
221
  model_type="starcoder",
222
  threads=os.cpu_count() // 2, # type: ignore
223
  )
224
+ # LLM = AutoModelForCausalLM.from_pretrained(
225
+ # "TheBloke/WizardCoder-15B-1.0-GGML",
226
+ # model_file=MODEL_FILENAME,
227
+ # model_type="starcoder",
228
+ # threads=os.cpu_count() // 2 # type: ignore
229
+ # )
230
 
231
  GENERATION_CONFIG = GenerationConfig(
232
  temperature=0.2,