Spaces:
Runtime error
Runtime error
Commit
·
f8dc7a7
1
Parent(s):
bb6245e
Update
Browse files
app.py
CHANGED
|
@@ -16,6 +16,8 @@ from typing import Optional
|
|
| 16 |
|
| 17 |
import warnings
|
| 18 |
|
|
|
|
|
|
|
| 19 |
from huggingface_hub import hf_hub_download
|
| 20 |
hf_hub_download = partial(hf_hub_download, library_name="gligen_demo")
|
| 21 |
|
|
@@ -59,7 +61,8 @@ class Instance:
|
|
| 59 |
self.capacity = capacity
|
| 60 |
|
| 61 |
def _log(self, batch_size, instruction, phrase_list):
|
| 62 |
-
|
|
|
|
| 63 |
|
| 64 |
def get_model(self, model_type, batch_size, instruction, phrase_list):
|
| 65 |
if model_type in self.loaded_model_list:
|
|
|
|
| 16 |
|
| 17 |
import warnings
|
| 18 |
|
| 19 |
+
from datetime import datetime
|
| 20 |
+
|
| 21 |
from huggingface_hub import hf_hub_download
|
| 22 |
hf_hub_download = partial(hf_hub_download, library_name="gligen_demo")
|
| 23 |
|
|
|
|
| 61 |
self.capacity = capacity
|
| 62 |
|
| 63 |
def _log(self, batch_size, instruction, phrase_list):
|
| 64 |
+
current_time = datetime.now().strftime("%Y-%m-%d %H:%M:%S")
|
| 65 |
+
print(f'[{current_time}] ' + str(dict(self.counter)), f'samples: {batch_size}', f'prompt: {instruction}', f'phrases: {phrase_list}', sep=', ')
|
| 66 |
|
| 67 |
def get_model(self, model_type, batch_size, instruction, phrase_list):
|
| 68 |
if model_type in self.loaded_model_list:
|