Update app.py
Browse files
app.py
CHANGED
|
@@ -25,7 +25,28 @@ output_name = session.get_outputs()[0].name
|
|
| 25 |
# ==============================================================================
|
| 26 |
# 2. STRUKTUR MAP SEMANTIK CALTECH-256 (KALIBRASI MUTLAK DATASET ASLI)
|
| 27 |
# ==============================================================================
|
| 28 |
-
CLASSES = ['ak47', 'american-flag', 'backpack', 'baseball-bat', 'baseball-glove', 'basketball-hoop', 'bat', 'bathtub', 'bear', 'beer-mug', 'billiards', 'binoculars',
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 29 |
|
| 30 |
# ==============================================================================
|
| 31 |
# 3. FUNGSI PIPELINE INFERENCE (PREPROCESSING & RUN)
|
|
@@ -99,5 +120,5 @@ with gr.Blocks(theme=gr.themes.Soft()) as demo:
|
|
| 99 |
if __name__ == "__main__":
|
| 100 |
#demo.launch()
|
| 101 |
# PASTIKAN DI BAGIAN PALING BAWAH APP.PY SEPERTI INI:
|
| 102 |
-
demo.launch(server_name="0.0.0.0", server_port=7860)
|
| 103 |
|
|
|
|
| 25 |
# ==============================================================================
|
| 26 |
# 2. STRUKTUR MAP SEMANTIK CALTECH-256 (KALIBRASI MUTLAK DATASET ASLI)
|
| 27 |
# ==============================================================================
|
| 28 |
+
CLASSES = ['ak47', 'american-flag', 'backpack', 'baseball-bat', 'baseball-glove', 'basketball-hoop', 'bat', 'bathtub', 'bear', 'beer-mug', 'billiards', 'binoculars',
|
| 29 |
+
'birdbath', 'blimp', 'bonsai-101', 'boom-box', 'bowling-ball', 'bowling-pin', 'boxing-glove', 'brain-101', 'breadmaker', 'buddha-101', 'bulldozer', 'butterfly',
|
| 30 |
+
'cactus', 'cake', 'calculator', 'camel', 'cannon', 'canoe', 'car-tire', 'cartman', 'cd', 'centipede', 'cereal-box', 'chandelier-101', 'chess-board', 'chimp',
|
| 31 |
+
'chopsticks', 'cockroach', 'coffee-mug', 'coffin', 'coin', 'comet', 'computer-keyboard', 'computer-monitor', 'computer-mouse', 'conch', 'cormorant', 'covered-wagon',
|
| 32 |
+
'cowboy-hat', 'crab-101', 'desk-globe', 'diamond-ring', 'dice', 'dog', 'dolphin-101', 'doorknob', 'drinking-straw', 'duck', 'dumb-bell', 'eiffel-tower', 'electric-guitar-101',
|
| 33 |
+
'elephant-101', 'elk', 'ewer-101', 'eyeglasses', 'fern', 'fighter-jet', 'fire-extinguisher', 'fire-hydrant', 'fire-truck', 'fireworks', 'flashlight', 'floppy-disk',
|
| 34 |
+
'football-helmet', 'french-horn', 'fried-egg', 'frisbee', 'frog', 'frying-pan', 'galaxy', 'gas-pump', 'giraffe', 'goat', 'golden-gate-bridge', 'goldfish',
|
| 35 |
+
'golf-ball', 'goose', 'gorilla', 'grand-piano-101', 'grapes', 'grasshopper', 'guitar-pick', 'hamburger', 'hammock', 'harmonica', 'harp', 'harpsichord', 'hawksbill-101',
|
| 36 |
+
'head-phones', 'helicopter-101', 'hibiscus', 'homer-simpson', 'horse', 'horseshoe-crab', 'hot-air-balloon', 'hot-dog', 'hot-tub', 'hourglass', 'house-fly',
|
| 37 |
+
'human-skeleton', 'hummingbird', 'ibis-101', 'ice-cream-cone', 'iguana', 'ipod', 'iris', 'jesus-christ', 'joy-stick', 'kangaroo-101', 'kayak', 'ketch-101',
|
| 38 |
+
'killer-whale', 'knife', 'ladder', 'laptop-101', 'lathe', 'leopards-101', 'license-plate', 'lightbulb', 'light-house', 'lightning', 'llama-101', 'mailbox',
|
| 39 |
+
'mandolin', 'mars', 'mattress', 'megaphone', 'menorah-101', 'microscope', 'microwave', 'minaret', 'minotaur', 'motorbikes-101', 'mountain-bike', 'mushroom',
|
| 40 |
+
'mussels', 'necktie', 'octopus', 'ostrich', 'owl', 'palm-pilot', 'palm-tree', 'paperclip', 'paper-shredder', 'pci-card', 'penguin', 'people', 'pez-dispenser',
|
| 41 |
+
'photocopier', 'picnic-table', 'playing-card', 'porcupine', 'pram', 'praying-mantis', 'pyramid', 'raccoon', 'radio-telescope', 'rainbow', 'refrigerator',
|
| 42 |
+
'revolver-101', 'rifle', 'rotary-phone', 'roulette-wheel', 'saddle', 'saturn', 'school-bus', 'scorpion-101', 'screwdriver', 'segway', 'self-propelled-lawn-mower',
|
| 43 |
+
'sextant', 'sheet-music', 'skateboard', 'skunk', 'skyscraper', 'smokestack', 'snail', 'snake', 'sneaker', 'snowmobile', 'soccer-ball', 'socks', 'soda-can', 'spaghetti',
|
| 44 |
+
'speed-boat', 'spider', 'spoon', 'stained-glass', 'starfish-101', 'steering-wheel', 'stirrups', 'sunflower-101', 'superman', 'sushi', 'swan', 'swiss-army-knife',
|
| 45 |
+
'sword', 'syringe', 'tambourine', 'teapot', 'teddy-bear', 'teepee', 'telephone-box', 'tennis-ball', 'tennis-court', 'tennis-racket', 'theodolite', 'toaster',
|
| 46 |
+
'tomato', 'tombstone', 'top-hat', 'touring-bike', 'tower-pisa', 'traffic-light', 'treadmill', 'triceratops', 'tricycle', 'trilobite-101', 'tripod', 't-shirt',
|
| 47 |
+
'tuning-fork', 'tweezer', 'umbrella-101', 'unicorn', 'vcr', 'video-projector', 'washing-machine', 'watch-101', 'waterfall', 'watermelon', 'welding-mask',
|
| 48 |
+
'wheelbarrow', 'windmill', 'wine-bottle', 'xylophone', 'yarmulke', 'yo-yo', 'zebra', 'airplanes-101', 'car-side-101', 'faces-easy-101', 'greyhound',
|
| 49 |
+
'tennis-shoes', 'toad', 'clutter']
|
| 50 |
|
| 51 |
# ==============================================================================
|
| 52 |
# 3. FUNGSI PIPELINE INFERENCE (PREPROCESSING & RUN)
|
|
|
|
| 120 |
if __name__ == "__main__":
|
| 121 |
#demo.launch()
|
| 122 |
# PASTIKAN DI BAGIAN PALING BAWAH APP.PY SEPERTI INI:
|
| 123 |
+
demo.launch(server_name="0.0.0.0", server_port=7860, theme=gr.themes.Soft())
|
| 124 |
|