Browse Source

la meilleur traduction

main
Alex 1 month ago
parent
commit
aa2ab7dbec
  1. 2
      Modelfile
  2. 4
      main.py

2
Modelfile

@ -1,5 +1,5 @@
FROM zongwei/gemma3-translator:4b
PARAMETER temperature 0.9
PARAMETER temperature 5
PARAMETER num_ctx 131072
SYSTEM """
Tu es un traducteur professionnel spécialisé dans la traduction de texte ukrainien en français.

4
main.py

@ -18,8 +18,8 @@ OLLAMA_URL = "http://localhost:11434/api/generate"
TARGET_LANGUAGE = "français"
CHECKPOINT_FILE = "checkpoint.json"
TEMP_OUTPUT_TXT = "output_temp.txt"
FINAL_OUTPUT_PDF = PDF_PATH.replace(".pdf",f" ({TARGET_LANGUAGE.upper()[:2]})_V2.pdf")
FINAL_OUTPUT_TXT = PDF_PATH.replace(".pdf",f" ({TARGET_LANGUAGE.upper()[:2]})_V2.txt")
FINAL_OUTPUT_PDF = PDF_PATH.replace(".pdf",f" ({TARGET_LANGUAGE.upper()[:2]})_V4.pdf")
FINAL_OUTPUT_TXT = PDF_PATH.replace(".pdf",f" ({TARGET_LANGUAGE.upper()[:2]})_V4.txt")
def extract_parameters_from_template(template_str):
"""Extrait les paramètres du modèle à partir du template."""

Loading…
Cancel
Save