bambadij commited on
Commit
505ff54
·
verified ·
1 Parent(s): 3dbe404
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -20,6 +20,7 @@ os.environ['HF_HOME'] = '/app/.cache'
20
  # model = T5ForConditionalGeneration.from_pretrained(model_name)
21
  # model = AutoModelForCausalLM.from_pretrained("THUDM/longwriter-glm4-9b", trust_remote_code=True)
22
  # tokenizer = AutoTokenizer.from_pretrained("THUDM/longwriter-glm4-9b", trust_remote_code=True)
 
23
 
24
  # Configuration du client OpenAI avec l'API NVIDIA
25
  client = OpenAI(
@@ -98,8 +99,8 @@ async def generate_text(request: RequestModel):
98
  model="meta/llama-3.1-8b-instruct",
99
  messages=[{"role": "user", "content": instructions_par_defaut + request.text}],
100
  temperature=0.2,
101
- top_p=0.7,
102
- max_tokens=1024,
103
  stream=True
104
  )
105
  # response = ollama.chat(
 
20
  # model = T5ForConditionalGeneration.from_pretrained(model_name)
21
  # model = AutoModelForCausalLM.from_pretrained("THUDM/longwriter-glm4-9b", trust_remote_code=True)
22
  # tokenizer = AutoTokenizer.from_pretrained("THUDM/longwriter-glm4-9b", trust_remote_code=True)
23
+ prompt_first ="Résumé en 4 ou 5 phrases de la plainte suivante :"
24
 
25
  # Configuration du client OpenAI avec l'API NVIDIA
26
  client = OpenAI(
 
99
  model="meta/llama-3.1-8b-instruct",
100
  messages=[{"role": "user", "content": instructions_par_defaut + request.text}],
101
  temperature=0.2,
102
+ top_p=0.9,
103
+ # max_tokens=1024,
104
  stream=True
105
  )
106
  # response = ollama.chat(