Spaces:
Running
Running
transformers.utils.move_cache()
Browse files
app.py
CHANGED
@@ -9,9 +9,13 @@ import fitz
|
|
9 |
import gradio as gr
|
10 |
import spaces
|
11 |
import torch
|
|
|
12 |
from PIL import Image, ImageEnhance
|
13 |
from transformers import AutoModel, AutoTokenizer
|
14 |
|
|
|
|
|
|
|
15 |
model_name = "ucaslcl/GOT-OCR2_0"
|
16 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
17 |
|
|
|
9 |
import gradio as gr
|
10 |
import spaces
|
11 |
import torch
|
12 |
+
import transformers
|
13 |
from PIL import Image, ImageEnhance
|
14 |
from transformers import AutoModel, AutoTokenizer
|
15 |
|
16 |
+
transformers.utils.move_cache()
|
17 |
+
transformers.logging.set_verbosity_error()
|
18 |
+
|
19 |
model_name = "ucaslcl/GOT-OCR2_0"
|
20 |
device = "cuda" if torch.cuda.is_available() else "cpu"
|
21 |
|