phisinger commited on
Commit
d250781
·
1 Parent(s): c6393e9
Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -12,6 +12,7 @@ from langchain.llms import GPT4All
12
 
13
  modelPath = "/home/phisinger/Programmieren/wahlprogramm_analyse/models/mistral-7b-openorca.Q4_0.gguf"
14
  if (os.path.exists(modelPath) == False):
 
15
  url = "https://huggingface.co/TheBloke/Mistral-7B-OpenOrca-GGUF/resolve/main/mistral-7b-openorca.Q4_K_M.gguf"
16
  response = requests.get(url)
17
  with open("./model.gguf", mode="wb") as file:
@@ -19,6 +20,8 @@ if (os.path.exists(modelPath) == False):
19
  print("Model downloaded")
20
  modelPath = "./model.gguf"
21
 
 
 
22
  llm = GPT4All(
23
  model=modelPath,
24
  max_tokens=2048,
 
12
 
13
  modelPath = "/home/phisinger/Programmieren/wahlprogramm_analyse/models/mistral-7b-openorca.Q4_0.gguf"
14
  if (os.path.exists(modelPath) == False):
15
+ print("Model was not found locally, start downloading")
16
  url = "https://huggingface.co/TheBloke/Mistral-7B-OpenOrca-GGUF/resolve/main/mistral-7b-openorca.Q4_K_M.gguf"
17
  response = requests.get(url)
18
  with open("./model.gguf", mode="wb") as file:
 
20
  print("Model downloaded")
21
  modelPath = "./model.gguf"
22
 
23
+ print(f"model path: {modelPath}")
24
+
25
  llm = GPT4All(
26
  model=modelPath,
27
  max_tokens=2048,