ejschwartz commited on
Commit
3b930a2
·
1 Parent(s): 7dfd5db

Attempt to load model

Browse files
Files changed (2) hide show
  1. app.py +9 -0
  2. requirements.txt +2 -0
app.py CHANGED
@@ -1,5 +1,14 @@
1
  import gradio as gr
2
 
 
 
 
 
 
 
 
 
 
3
  def greet(name):
4
  return "Hello " + name + "!!"
5
 
 
1
  import gradio as gr
2
 
3
+ from transformers import AutoTokenizer, AutoModelForCausalLM
4
+
5
+ model_id = "AverageBusinessUser/aidapal"
6
+ filename = "aidapal-8k.Q4_K_M.gguf"
7
+
8
+ #torch_dtype = torch.float32 # could be torch.float16 or torch.bfloat16 too
9
+ tokenizer = AutoTokenizer.from_pretrained(model_id, gguf_file=filename)
10
+ model = AutoModelForCausalLM.from_pretrained(model_id, gguf_file=filename, torch_dtype=torch_dtype)
11
+
12
  def greet(name):
13
  return "Hello " + name + "!!"
14
 
requirements.txt ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ transformers
2
+ gguf