File size: 653 Bytes
10f417b
 
 
 
 
 
 
 
 
 
8d1b720
 
10f417b
 
 
8d1b720
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
from bias_check import bias_checker
from video2txt import read_video_file_and_return_text as rtxt
from img2txt import load_image_pipeline as img_pipe

def app_nlp_start(statement):
    output_txt, interpreted_txt = bias_checker(statement)
    return output_txt, interpreted_txt

def app_video_start(video_path):
    return_text = rtxt(video_path)
    output_txt, interpreted_txt = bias_checker(return_text)
    return output_txt, interpreted_txt, return_text

def app_image_start(image_path):
    text_generated = img_pipe(image_path)
    output_txt, interpreted_txt = bias_checker(text_generated)
    return output_txt, interpreted_txt, text_generated