alfredplpl commited on
Commit
c249ff0
·
verified ·
1 Parent(s): 74f551d

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -5,7 +5,7 @@ import os
5
  import spaces
6
  from transformers import AutoModel, AutoTokenizer, TextIteratorStreamer
7
  from threading import Thread
8
-
9
 
10
  DESCRIPTION = '''
11
  <div>
@@ -45,7 +45,7 @@ h1 {
45
 
46
  # Load the tokenizer and model
47
  tokenizer = AutoTokenizer.from_pretrained("alfredplpl/sarashina2-7b-it-test")
48
- model = AutoModel.from_pretrained("alfredplpl/sarashina2-7b-it-test", device_map="auto")
49
 
50
  @spaces.GPU()
51
  def chat_llama3_8b(message: str,
 
5
  import spaces
6
  from transformers import AutoModel, AutoTokenizer, TextIteratorStreamer
7
  from threading import Thread
8
+ from peft import AutoPeftModelForCausalLM
9
 
10
  DESCRIPTION = '''
11
  <div>
 
45
 
46
  # Load the tokenizer and model
47
  tokenizer = AutoTokenizer.from_pretrained("alfredplpl/sarashina2-7b-it-test")
48
+ model = AutoPeftModelForCausalLM.from_pretrained("alfredplpl/sarashina2-7b-it-test", device_map="auto")
49
 
50
  @spaces.GPU()
51
  def chat_llama3_8b(message: str,