alfredplpl commited on
Commit
da0d3db
·
verified ·
1 Parent(s): 09e141a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -4,7 +4,7 @@ import gradio as gr
4
  import os
5
  import spaces
6
  import torch
7
- from transformers import AutoModel, AutoTokenizer, TextIteratorStreamer
8
  from threading import Thread
9
 
10
  DESCRIPTION = '''
@@ -45,7 +45,7 @@ h1 {
45
 
46
  # Load the tokenizer and model
47
  tokenizer = AutoTokenizer.from_pretrained("alfredplpl/sarashina2-7b-it")
48
- model = AutoModel.from_pretrained("alfredplpl/sarashina2-7b-it", torch_dtype=torch.bfloat16)
49
  model=model.to("cuda:0")
50
 
51
  @spaces.GPU()
 
4
  import os
5
  import spaces
6
  import torch
7
+ from transformers import AutoModelForCausalLM, AutoTokenizer, TextIteratorStreamer
8
  from threading import Thread
9
 
10
  DESCRIPTION = '''
 
45
 
46
  # Load the tokenizer and model
47
  tokenizer = AutoTokenizer.from_pretrained("alfredplpl/sarashina2-7b-it")
48
+ model = AutoModelForCausalLM.from_pretrained("alfredplpl/sarashina2-7b-it", torch_dtype=torch.bfloat16)
49
  model=model.to("cuda:0")
50
 
51
  @spaces.GPU()