MERC / app.py
AlexandraDolidze's picture
Inference and app.py added
f2c3ec9
raw
history blame
No virus
738 Bytes
import streamlit as st
import hf_inference
# пути до моделей словарь
models_dict = ['text_model_path' : text_model_path,
'video_model_path' : video_model_path,
'audio_model_path': audio_model_path]
st.title("Multimodal ERC project")
uploaded_file = st.file_uploader("Choose a video")
input_text = st.text_area("Please, write transcript", '''That's obligatory.''')
if uploaded_file is not None & input_text != '''That's obligatory.''':
output_emotion = infer_multimodal_model(input_text, uploaded_file, models_dict)
# закидываю видео и текст в инференс
# получаю аутпут эмоции
st.write(f"We think that's {output_emotion}")