File size: 1,218 Bytes
2023a9f
 
 
 
e155f7f
 
 
 
 
 
 
 
 
4912df2
 
64b80f6
663c67b
 
e155f7f
2023a9f
 
 
 
e155f7f
 
21e723b
2023a9f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
import os

import gradio as gr

from base import Classification

apps = [
    Classification('Classification', 'deepghs/anime_classification', 'mobilenetv3_sce_dist'),
    Classification('Monochrome', 'deepghs/monochrome_detect', 'mobilenetv3_large_100_dist'),
    Classification('AI Check', 'deepghs/anime_ai_check', 'mobilenetv3_sce_dist'),
    Classification('Rating', 'deepghs/anime_rating', 'mobilenetv3_sce_dist'),
    Classification('Character Sex', 'deepghs/anime_ch_sex', 'caformer_s36_v1'),
    Classification('Character Skin', 'deepghs/anime_ch_skin_color', 'caformer_s36'),
    Classification('Character Hair Color', 'deepghs/anime_ch_hair_color', 'caformer_s36_v0'),
    Classification('Character Eye Color', 'deepghs/anime_ch_eye_color', 'caformer_s36_v0'),
    Classification('Character Hair Length', 'deepghs/anime_ch_hair_length', 'caformer_s36_v0'),
    Classification('Character Ears', 'deepghs/anime_ch_ear', 'caformer_s36_v0'),
    Classification('Character Horns', 'deepghs/anime_ch_horn', 'caformer_s36_v0'),
]

if __name__ == '__main__':
    with gr.Blocks() as demo:
        with gr.Tabs():
            for cls in apps:
                cls.create_gr()

    demo.queue(os.cpu_count()).launch()