File size: 630 Bytes
439340a
cf91c74
439340a
 
 
 
 
 
 
 
 
 
 
 
 
cf91c74
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import gradio as gr
import os

def make_invisible():
    """
    Makes visible a row
    """
    return gr.Row.update(visible=False)


def make_visible():
    """
    Makes visibles a rows
    """
    return gr.Row.update(visible=True)


def create_folders():
    """
    Creates 'audios' and 'videos' directories if they do not exist
    """
    audio_dir = 'audios'
    video_dir = 'videos'
    times_dir = 'csv_times'

    if not os.path.exists(audio_dir):
        os.makedirs(audio_dir)

    if not os.path.exists(video_dir):
        os.makedirs(video_dir)

    if not os.path.exists(times_dir):
        os.makedirs(times_dir)