File size: 1,758 Bytes
c6baa40
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
854a369
 
 
 
 
c6baa40
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
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()