Lumpen1 commited on
Commit
18b894b
1 Parent(s): 0826ff1

Initial Commit

Browse files
Files changed (1) hide show
  1. app.py +12 -0
app.py CHANGED
@@ -2,6 +2,7 @@
2
  import spaces
3
  import logging
4
  import gradio as gr
 
5
  from llama_cpp import Llama
6
 
7
  # Locals
@@ -27,6 +28,17 @@ examples = [
27
  ["filetype:pdf intitle:python"]
28
  ]
29
 
 
 
 
 
 
 
 
 
 
 
 
30
  def get_context_by_model(model_name):
31
  model_context_limits = {
32
  "Mistral-7B-Instruct-v0.3-Q6_K.gguf": 32768,
 
2
  import spaces
3
  import logging
4
  import gradio as gr
5
+ from huggingface_hub import hf_hub_download
6
  from llama_cpp import Llama
7
 
8
  # Locals
 
28
  ["filetype:pdf intitle:python"]
29
  ]
30
 
31
+ hf_hub_download(
32
+ repo_id="bartowski/Mistral-7B-Instruct-v0.3-GGUF",
33
+ filename="Mistral-7B-Instruct-v0.3-Q6_K.gguf",
34
+ local_dir="./models"
35
+ )
36
+ hf_hub_download(
37
+ repo_id="bartowski/Meta-Llama-3-8B-Instruct-GGUF",
38
+ filename="Meta-Llama-3-8B-Instruct-Q6_K.gguf",
39
+ local_dir="./models"
40
+ )
41
+
42
  def get_context_by_model(model_name):
43
  model_context_limits = {
44
  "Mistral-7B-Instruct-v0.3-Q6_K.gguf": 32768,