Upload anime_image_classification/app.py with huggingface_hub
Browse files
anime_image_classification/app.py
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
import os
|
| 2 |
+
|
| 3 |
+
import gradio as gr
|
| 4 |
+
|
| 5 |
+
from base import Classification
|
| 6 |
+
|
| 7 |
+
apps = [
|
| 8 |
+
Classification('Classification', 'deepghs/anime_classification', 'mobilenetv3_v1.3_dist'),
|
| 9 |
+
Classification('Monochrome', 'deepghs/monochrome_detect', 'mobilenetv3_large_100_dist'),
|
| 10 |
+
Classification('Completeness', 'deepghs/anime_completeness', 'mobilenetv3_v2.2_dist'),
|
| 11 |
+
Classification('AI Check', 'deepghs/anime_ai_check', 'mobilenetv3_sce_dist'),
|
| 12 |
+
Classification('AI Corrupt', 'deepghs/ai_image_corrupted', 'caformer_s36_v0_focal'),
|
| 13 |
+
Classification('Rating', 'deepghs/anime_rating', 'mobilenetv3_sce_dist'),
|
| 14 |
+
Classification('Character Sex', 'deepghs/anime_ch_sex', 'caformer_s36_v1'),
|
| 15 |
+
Classification('Portrait Type', 'deepghs/anime_portrait', 'mobilenetv3_v0_dist'),
|
| 16 |
+
Classification('Age of Style', 'deepghs/anime_style_ages', 'mobilenetv3_v0_dist'),
|
| 17 |
+
Classification('Bangumi Portrait', 'deepghs/bangumi_char_type', 'mobilenetv3_v0_dist'),
|
| 18 |
+
Classification('Is That Anime?', 'deepghs/anime_real_cls', 'mobilenetv3_v1.2_dist'),
|
| 19 |
+
Classification('Teen', 'deepghs/anime_teen', 'caformer_s36_v0'),
|
| 20 |
+
Classification('Character Skin', 'deepghs/anime_ch_skin_color', 'caformer_s36'),
|
| 21 |
+
Classification('Character Hair Color', 'deepghs/anime_ch_hair_color', 'caformer_s36_v0'),
|
| 22 |
+
Classification('Character Eye Color', 'deepghs/anime_ch_eye_color', 'caformer_s36_v0'),
|
| 23 |
+
Classification('Character Hair Length', 'deepghs/anime_ch_hair_length', 'caformer_s36_v0'),
|
| 24 |
+
Classification('Character Ears', 'deepghs/anime_ch_ear', 'caformer_s36_v0'),
|
| 25 |
+
Classification('Character Horns', 'deepghs/anime_ch_horn', 'caformer_s36_v0'),
|
| 26 |
+
Classification('[Beta] Danbooru Rating', 'deepghs/anime_dbrating', 'mobilenetv3_large_100_v0_ls0.2'),
|
| 27 |
+
Classification('[Beta] Danbooru Aesthetic', 'deepghs/anime_aesthetic', 'caformer_s36_v0_ls0.2'),
|
| 28 |
+
]
|
| 29 |
+
|
| 30 |
+
if __name__ == '__main__':
|
| 31 |
+
with gr.Blocks() as demo:
|
| 32 |
+
with gr.Tabs():
|
| 33 |
+
for cls in apps:
|
| 34 |
+
cls.create_gr()
|
| 35 |
+
|
| 36 |
+
demo.queue(os.cpu_count()).launch()
|