EdysorEdutech commited on
Commit
1a8ba2f
·
verified ·
1 Parent(s): 7b65987

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +15 -0
app.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import subprocess
2
+ import sys
3
+
4
+ # Install bitsandbytes first
5
+ subprocess.check_call([sys.executable, "-m", "pip", "install", "bitsandbytes"])
6
+
7
+ # Then import and use your model
8
+ from transformers import AutoTokenizer, AutoModelForCausalLM
9
+ import torch
10
+
11
+ model = AutoModelForCausalLM.from_pretrained(
12
+ "EdysorEdutech/gatewaytrainedmodel",
13
+ load_in_4bit=True,
14
+ device_map="auto"
15
+ )