developer3000 commited on
Commit
6c5b639
1 Parent(s): 5bdffed

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -1,12 +1,16 @@
1
  from llama_cpp import Llama
2
  import gradio as gr
3
  import os
 
4
 
5
  os.makedirs("content", exist_ok=True) # Создание директории для сохранения модели
 
6
  model_name = "aaditya/OpenBioLLM-Llama3-8B-GGUF"
 
 
7
  model_file = "openbiollm-llama3-8b.Q5_K_M.gguf"
8
 
9
- model_path = hf_hub_download(model_name,
10
  filename=model_file,
11
  local_dir='./content')
12
  print("My model path: ", model_path)
 
1
  from llama_cpp import Llama
2
  import gradio as gr
3
  import os
4
+ from transformers import AutoModel, AutoTokenizer
5
 
6
  os.makedirs("content", exist_ok=True) # Создание директории для сохранения модели
7
+
8
  model_name = "aaditya/OpenBioLLM-Llama3-8B-GGUF"
9
+ tokenizer = AutoTokenizer.from_pretrained(model_name)
10
+ model = AutoModel.from_pretrained(model_name)
11
  model_file = "openbiollm-llama3-8b.Q5_K_M.gguf"
12
 
13
+ model_path = hf_hub_download(model,
14
  filename=model_file,
15
  local_dir='./content')
16
  print("My model path: ", model_path)