Spaces:
Sleeping
Sleeping
Merge commit '04b24527b550f02d4cac5bfb7b811a2e45b5f9aa'
Browse files- app.py +1 -1
- gui_app.py +1 -1
- main.py +8 -8
app.py
CHANGED
@@ -10,7 +10,7 @@ import numpy as np
|
|
10 |
import pandas as pd
|
11 |
from gradio_modal import Modal
|
12 |
from PIL import Image
|
13 |
-
from transformers import pipeline
|
14 |
|
15 |
import dds
|
16 |
from identify_cards import (
|
|
|
10 |
import pandas as pd
|
11 |
from gradio_modal import Modal
|
12 |
from PIL import Image
|
13 |
+
# from transformers import pipeline
|
14 |
|
15 |
import dds
|
16 |
from identify_cards import (
|
gui_app.py
CHANGED
@@ -10,7 +10,7 @@ from tkinter import filedialog, messagebox, ttk
|
|
10 |
import cv2
|
11 |
import numpy as np
|
12 |
from PIL import Image, ImageTk
|
13 |
-
from transformers import pipeline
|
14 |
|
15 |
import dds
|
16 |
from identify_cards import (determine_and_correct_orientation, find_center_box,
|
|
|
10 |
import cv2
|
11 |
import numpy as np
|
12 |
from PIL import Image, ImageTk
|
13 |
+
# from transformers import pipeline
|
14 |
|
15 |
import dds
|
16 |
from identify_cards import (determine_and_correct_orientation, find_center_box,
|
main.py
CHANGED
@@ -81,14 +81,14 @@ async def analyze_image(image_paths: list[UploadFile]):
|
|
81 |
# image_paths = request["image_paths"]
|
82 |
print(image_paths)
|
83 |
progress = lambda x, desc: print(x, desc)
|
84 |
-
global trocr_pipeline
|
85 |
-
# モデルが読み込まれているか確認
|
86 |
-
if trocr_pipeline is None:
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
|
93 |
all_results = []
|
94 |
num_total_files = len(image_paths)
|
|
|
81 |
# image_paths = request["image_paths"]
|
82 |
print(image_paths)
|
83 |
progress = lambda x, desc: print(x, desc)
|
84 |
+
# global trocr_pipeline
|
85 |
+
# # モデルが読み込まれているか確認
|
86 |
+
# if trocr_pipeline is None:
|
87 |
+
# print(
|
88 |
+
# "AIモデルがまだ読み込まれていません。しばらく待ってから再度お試しください。"
|
89 |
+
# )
|
90 |
+
# # 空の更新を返すことで、UIの状態を変えずに処理を終了
|
91 |
+
# return
|
92 |
|
93 |
all_results = []
|
94 |
num_total_files = len(image_paths)
|