Gabriel commited on
Commit
34b98f1
1 Parent(s): 0dffbb8

fixed os and shutil import error

Browse files
app.py CHANGED
@@ -118,7 +118,7 @@ print(job.result())
118
  demo.load(None, None, None, _js=js)
119
 
120
 
121
- demo.queue(concurrency_count=5, max_size=20)
122
 
123
 
124
  if __name__ == "__main__":
 
118
  demo.load(None, None, None, _js=js)
119
 
120
 
121
+ demo.queue(max_size=5)
122
 
123
 
124
  if __name__ == "__main__":
helper/examples/examples.py CHANGED
@@ -16,9 +16,7 @@ class DemoImages:
16
  if not hasattr(self, "images_datasets"):
17
  self.images_datasets = datasets.load_dataset(url, cache_dir=cache_dir)
18
  self.example_df = self.images_datasets["train"].to_pandas()
19
- print("df images: ", self.example_df)
20
  self.examples_list = self.convert_bytes_to_images()
21
- print("loaded images: ", self.examples_list)
22
 
23
  def convert_bytes_to_images(self):
24
  examples_list = []
 
16
  if not hasattr(self, "images_datasets"):
17
  self.images_datasets = datasets.load_dataset(url, cache_dir=cache_dir)
18
  self.example_df = self.images_datasets["train"].to_pandas()
 
19
  self.examples_list = self.convert_bytes_to_images()
 
20
 
21
  def convert_bytes_to_images(self):
22
  examples_list = []
requirements.txt CHANGED
@@ -10,6 +10,8 @@ transformers==4.30.2
10
  huggingface-hub==0.15.1
11
  datasets==2.13.1
12
  requests==2.31.0
 
 
13
 
14
 
15
  # make install_openmmlab (they are excuted in dockerfile)
 
10
  huggingface-hub==0.15.1
11
  datasets==2.13.1
12
  requests==2.31.0
13
+ pillow==9.5.0
14
+
15
 
16
 
17
  # make install_openmmlab (they are excuted in dockerfile)
tabs/stepwise_htr_tool.py CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  import gradio as gr
2
 
3
  from helper.examples.examples import DemoImages
 
1
+ import os
2
+ import shutil
3
+
4
  import gradio as gr
5
 
6
  from helper.examples.examples import DemoImages