Demosthene-OR
commited on
Commit
•
4fbb72d
1
Parent(s):
6f7f387
Update modelisation_seq2seq_tab.py
Browse files
tabs/modelisation_seq2seq_tab.py
CHANGED
@@ -115,7 +115,7 @@ def display_translation2(n1, Lang, model_type):
|
|
115 |
|
116 |
with Pool(n) as p:
|
117 |
# Appels parallèles à fetch_translation avec les URLs
|
118 |
-
responses = p.map(
|
119 |
|
120 |
for response, s_text, s_ref in zip(responses, s, s_trad_ref):
|
121 |
s_trad.append(response.json())
|
@@ -162,7 +162,7 @@ async def display_translation1(n1, Lang, model_type):
|
|
162 |
url = "https://demosthene-or-api-avr23-cds-translation.hf.space/small_vocab/transformer"
|
163 |
|
164 |
# Ajout de la tâche à la liste des tâches
|
165 |
-
tasks.append(
|
166 |
|
167 |
# Exécution des tâches en parallèle
|
168 |
responses = await asyncio.gather(*tasks)
|
|
|
115 |
|
116 |
with Pool(n) as p:
|
117 |
# Appels parallèles à fetch_translation avec les URLs
|
118 |
+
responses = p.map(fetch_translation2, params)
|
119 |
|
120 |
for response, s_text, s_ref in zip(responses, s, s_trad_ref):
|
121 |
s_trad.append(response.json())
|
|
|
162 |
url = "https://demosthene-or-api-avr23-cds-translation.hf.space/small_vocab/transformer"
|
163 |
|
164 |
# Ajout de la tâche à la liste des tâches
|
165 |
+
tasks.append(fetch_translation1(url, params))
|
166 |
|
167 |
# Exécution des tâches en parallèle
|
168 |
responses = await asyncio.gather(*tasks)
|