File size: 966 Bytes
438833d f6b625e 0e31adc e001d2e aa58e2f e001d2e 57b9447 64a6ef4 6672a13 7a74048 aa58e2f ed350f1 f098da2 302f1b5 cc6cbbe 0e31adc da16091 caab77b da16091 438833d 64a6ef4 754b842 302f1b5 f6b625e e001d2e f6b625e 794777e 359f6f7 0b3304a be36f5d 0b3304a 511dc85 |
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 |
from image import *
from language import *
from textToSpeach import *
from translation import *
import streamlit as st
import os
# url = "https://i.imgur.com/qs0CxjE_d.webp?maxwidth=760&fidelity=grand"
# text = "How many cars are here?"
st.write('Part 1')
question = st.text_input('Posez votre question')
url = st.text_input('mettez le liens de votre image')
tts = st.checkbox('lire la réponse')
if url :
st.image(url, width=250)
if st.button('générer'):
question = frenchtoenglish(question)
responseBase = image(url, question)
st.write('response is :', responseBase)
st.write('Part 2')
enResponse = longText(responseBase, question)
frResponse = englishtofrench(enResponse)
st.write('en : ',enResponse)
st.write('fr : ',frResponse)
st.write('Part 3 : TTS')
if tts:
st.write('le TTS est en cours de chargement')
st.audio(speaking(frResponse))
else:
st.write('Pas de tts demander')
|