Spaces:
Running
on
Zero
Running
on
Zero
DongfuJiang
commited on
Merge branch 'main' of https://huggingface.co/spaces/TIGER-Lab/GenAI-Arena
Browse files- arena_elo/elo_results_20240811.pkl +0 -3
- model/model_manager.py +14 -14
arena_elo/elo_results_20240811.pkl
DELETED
@@ -1,3 +0,0 @@
|
|
1 |
-
version https://git-lfs.github.com/spec/v1
|
2 |
-
oid sha256:e2f3d61c0154d7f2d19a0bbd3b85b44dbca7a3512a78785379a0494fc8be6201
|
3 |
-
size 73808
|
|
|
|
|
|
|
|
model/model_manager.py
CHANGED
@@ -72,23 +72,23 @@ class ModelManager:
|
|
72 |
|
73 |
@spaces.GPU(duration=120)
|
74 |
def generate_image_ig(self, prompt, model_name):
|
75 |
-
if 'unsafe' not in self.NSFW_filter(prompt):
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
else:
|
80 |
-
|
81 |
-
|
82 |
return result
|
83 |
|
84 |
def generate_image_ig_api(self, prompt, model_name):
|
85 |
-
if 'unsafe' not in self.NSFW_filter(prompt):
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
else:
|
90 |
-
|
91 |
-
|
92 |
return result
|
93 |
|
94 |
def generate_image_ig_museum(self, model_name):
|
|
|
72 |
|
73 |
@spaces.GPU(duration=120)
|
74 |
def generate_image_ig(self, prompt, model_name):
|
75 |
+
# if 'unsafe' not in self.NSFW_filter(prompt):
|
76 |
+
print('The prompt is safe')
|
77 |
+
pipe = self.load_model_pipe(model_name)
|
78 |
+
result = pipe(prompt=prompt)
|
79 |
+
# else:
|
80 |
+
# print(f'The prompt "{prompt}" is not safe')
|
81 |
+
# result = ''
|
82 |
return result
|
83 |
|
84 |
def generate_image_ig_api(self, prompt, model_name):
|
85 |
+
# if 'unsafe' not in self.NSFW_filter(prompt):
|
86 |
+
print('The prompt is safe')
|
87 |
+
pipe = self.load_model_pipe(model_name)
|
88 |
+
result = pipe(prompt=prompt)
|
89 |
+
# else:
|
90 |
+
# print(f'The prompt "{prompt}" is not safe')
|
91 |
+
# result = ''
|
92 |
return result
|
93 |
|
94 |
def generate_image_ig_museum(self, model_name):
|