import gradio as gr import argparse import sys import os from PIL import Image sys.path.append('Engineering-Clinic-Emerging-AI-Design-Interface/Interface_Dependencies') sys.path.append('Engineering-Clinic-Emerging-AI-Design-Interface/Interface') sys.path.append('Engineering-Clinic-Emerging-AI-Design-Interface/yolov7-main') sys.path.append('Engineering-Clinic-Emerging-AI-Design-Interface') sys.path.append('Interface_Dependencies') sys.path.append('Interface') import numpy as np shared_theme = gr.themes.Base() #from train import data from Interface.detect_interface import build_detect_interface from Interface.train_interface import build_train_interface from Interface.bio_interface import build_bio_interface import gradio as gr def build_main_interface(): detect = build_detect_interface() train = build_train_interface() bio = build_bio_interface() with gr.Blocks(title="YOLOv7 Interface",theme=shared_theme) as demo: gr.Markdown( """ # YOLOv7 Interface ### NOTE: Apologies, webcam/live stream function for video detection yields error(fix in progress...) ### Proudly created by: Christian Cippoletta, Craig Droke, Chinedu Ike-Anyanwu, James Galeno, Matthew O'Donnell, Ozan Tekben, Kaitlyn Pounds, and Ayo Overton Choose between the Detect and Train interfaces. """) gr.TabbedInterface(interface_list=[bio, detect, train], tab_names=["Bio", "Detect", "Train"], theme=shared_theme, analytics_enabled=True) return demo if __name__== "__main__" : # run_main_interface() demo = build_main_interface() demo.queue().launch()