Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -50,6 +50,7 @@ def load_model1():
|
|
50 |
processor1 = Pix2StructProcessor.from_pretrained('nuua/ko-deplot')
|
51 |
model1 = Pix2StructForConditionalGeneration.from_pretrained('nuua/ko-deplot')
|
52 |
model1.load_state_dict(torch.load(ko_deplot_model_path, map_location="cpu"))
|
|
|
53 |
return processor1,model1
|
54 |
|
55 |
processor1,model1=load_model1()
|
|
|
50 |
processor1 = Pix2StructProcessor.from_pretrained('nuua/ko-deplot')
|
51 |
model1 = Pix2StructForConditionalGeneration.from_pretrained('nuua/ko-deplot')
|
52 |
model1.load_state_dict(torch.load(ko_deplot_model_path, map_location="cpu"))
|
53 |
+
model1.to(torch.device("cuda"))
|
54 |
return processor1,model1
|
55 |
|
56 |
processor1,model1=load_model1()
|