Demosthene-OR commited on
Commit
d4af288
1 Parent(s): 48aade7

Update modelisation_seq2seq_tab.py

Browse files
Files changed (1) hide show
  1. tabs/modelisation_seq2seq_tab.py +8 -1
tabs/modelisation_seq2seq_tab.py CHANGED
@@ -433,7 +433,14 @@ def run():
433
  """)
434
  , unsafe_allow_html=True)
435
  st.write("<center><h5>"+tr("Architecture du modèle utilisé")+":</h5>", unsafe_allow_html=True)
436
- plot_model(translation_model, show_shapes=True, show_layer_names=True, show_layer_activations=True,rankdir='TB',to_file=st.session_state.ImagePath+'/model_plot.png')
 
 
 
 
 
 
 
437
  st.image(st.session_state.ImagePath+'/model_plot.png',use_column_width=True)
438
  st.write("</center>", unsafe_allow_html=True)
439
 
 
433
  """)
434
  , unsafe_allow_html=True)
435
  st.write("<center><h5>"+tr("Architecture du modèle utilisé")+":</h5>", unsafe_allow_html=True)
436
+ # URL de votre endpoint FastAPI avec les paramètres de requête
437
+ url = "https://demosthene-or-api-avr23-cds-translation.hf.space/small_vocab/plot_model"
438
+ if (chosen_id == "tab1"):
439
+ params = {"lang_tgt": Lang[-2:], "model_type": "rnn"}
440
+ else:
441
+ params = {"lang_tgt": Lang[-2:], "model_type": "transformer"}
442
+ # Envoie d'une requête GET avec les paramètres de requête
443
+ response = requests.get(url, params=params)
444
  st.image(st.session_state.ImagePath+'/model_plot.png',use_column_width=True)
445
  st.write("</center>", unsafe_allow_html=True)
446