Demosthene-OR
commited on
Commit
•
1a25283
1
Parent(s):
f9c573b
....
Browse files- api-url.txt +3 -3
- tabs/modelisation_seq2seq_tab.py +2 -2
api-url.txt
CHANGED
@@ -1,3 +1,3 @@
|
|
1 |
-
https://demosthene-or-api-avr23-cds-translation1.hf.space
|
2 |
-
https://demosthene-or-api-avr23-cds-translation2.hf.space
|
3 |
-
https://demosthene-or-api-avr23-cds-translation3.hf.space
|
|
|
1 |
+
https://demosthene-or-api-avr23-cds-translation1.hf.space, URL de base pour le RNN et Transformer (1er exemple), et pour les plot_model ains ique les autres fonction
|
2 |
+
https://demosthene-or-api-avr23-cds-translation2.hf.space, URL de base pour le RNN et Transformer (2eme exemple)
|
3 |
+
https://demosthene-or-api-avr23-cds-translation3.hf.space, URL de base pour le RNN et Transformer (3eme exemple)
|
tabs/modelisation_seq2seq_tab.py
CHANGED
@@ -75,11 +75,11 @@ def display_translation(n1, Lang, model_type):
|
|
75 |
'''
|
76 |
with Pool(n) as p:
|
77 |
# Appels parallèles à fetch_translation avec les URLs
|
78 |
-
responses = p.map(
|
79 |
'''
|
80 |
with concurrent.futures.ThreadPoolExecutor() as executor:
|
81 |
# Appels parallèles à fetch_translation avec les URLs
|
82 |
-
responses = list(executor.map(
|
83 |
|
84 |
for response, s_text, s_ref in zip(responses, s, s_trad_ref):
|
85 |
s_trad.append(response.json())
|
|
|
75 |
'''
|
76 |
with Pool(n) as p:
|
77 |
# Appels parallèles à fetch_translation avec les URLs
|
78 |
+
responses = p.map(fetch_translation, params)
|
79 |
'''
|
80 |
with concurrent.futures.ThreadPoolExecutor() as executor:
|
81 |
# Appels parallèles à fetch_translation avec les URLs
|
82 |
+
responses = list(executor.map(fetch_translation, params))
|
83 |
|
84 |
for response, s_text, s_ref in zip(responses, s, s_trad_ref):
|
85 |
s_trad.append(response.json())
|