MatteoScript commited on
Commit
9a3f336
·
verified ·
1 Parent(s): 5bd4722

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +3 -3
main.py CHANGED
@@ -75,9 +75,9 @@ def generate_text(request: Request, input_data: InputData):
75
  max_new_tokens = min(max_new_tokens, 29500 - len(input_text))
76
  history = []
77
  generated_response = generate(input_text, history, temperature, max_new_tokens, top_p, repetition_penalty)
78
- RispostaJSON = NormalizzaJSON(generated_response)
79
- LoggaTesto("RISPOSTA", RispostaJSON)
80
- return RispostaJSON
81
  else:
82
  input_data.asincrono = False
83
  if input_data.EliminaRisposteNonPertinenti:
 
75
  max_new_tokens = min(max_new_tokens, 29500 - len(input_text))
76
  history = []
77
  generated_response = generate(input_text, history, temperature, max_new_tokens, top_p, repetition_penalty)
78
+ #RispostaJSON = NormalizzaJSON(generated_response)
79
+ LoggaTesto("RISPOSTA", {"response": json.dumps(generated_response)})
80
+ return {"response": json.dumps(generated_response)}
81
  else:
82
  input_data.asincrono = False
83
  if input_data.EliminaRisposteNonPertinenti: