JaMe76 commited on
Commit
17aec31
·
1 Parent(s): fb050f0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -6,6 +6,7 @@ os.system("pip uninstall -y gradio")
6
  os.system("pip install gradio==3.4.1")
7
  os.system(os.environ["DD_ADDONS"])
8
 
 
9
  from os import getcwd, path, environ
10
  import deepdoctection as dd
11
  from deepdoctection.dataflow.serialize import DataFromList
@@ -184,7 +185,7 @@ def analyze_image(img, pdf, max_datapoints):
184
  analyzer = build_gradio_analyzer()
185
 
186
  if img is not None:
187
- image = dd.Image(file_name="input.png", location="")
188
  image.image = img[:, :, ::-1]
189
 
190
  df = DataFromList(lst=[image])
 
6
  os.system("pip install gradio==3.4.1")
7
  os.system(os.environ["DD_ADDONS"])
8
 
9
+ import time
10
  from os import getcwd, path, environ
11
  import deepdoctection as dd
12
  from deepdoctection.dataflow.serialize import DataFromList
 
185
  analyzer = build_gradio_analyzer()
186
 
187
  if img is not None:
188
+ image = dd.Image(file_name=str(time.time()).replace(".","") + ".png", location="")
189
  image.image = img[:, :, ::-1]
190
 
191
  df = DataFromList(lst=[image])