eronariodito commited on
Commit
6570459
·
verified ·
1 Parent(s): edd4aa8

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -1,11 +1,9 @@
1
  import gradio as gr
2
- from transformers import AutoModelForCausalLM, AutoTokenizer
3
- import torch
4
 
5
- # Load model and tokenizer directly
6
- model_name = "jdowling/lora_model"
7
- tokenizer = AutoTokenizer.from_pretrained(model_name)
8
- model = AutoModelForCausalLM.from_pretrained(model_name)
9
 
10
  # Move the model to the appropriate device (GPU if available, else CPU)
11
  device = "cuda" if torch.cuda.is_available() else "cpu"
 
1
  import gradio as gr
2
+ # Load model directly
3
+ from transformers import AutoTokenizer, AutoModelForCausalLM
4
 
5
+ tokenizer = AutoTokenizer.from_pretrained("unsloth/gemma-7b-bnb-4bit")
6
+ model = AutoModelForCausalLM.from_pretrained("unsloth/gemma-7b-bnb-4bit")
 
 
7
 
8
  # Move the model to the appropriate device (GPU if available, else CPU)
9
  device = "cuda" if torch.cuda.is_available() else "cpu"