Felguk commited on
Commit
d986a75
·
verified ·
1 Parent(s): d8ec53e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -16,7 +16,11 @@ def modify_code(file, prompt, model_name):
16
  return "Model not supported."
17
 
18
  # Generate the modified code based on the prompt
19
- modified_code = generator(f"{prompt}\n{code}", max_length=500, num_return_sequences=1)[0]['generated_text']
 
 
 
 
20
 
21
  # Truncate the output to a maximum of 793,833 lines (or characters)
22
  max_lines = 793833
 
16
  return "Model not supported."
17
 
18
  # Generate the modified code based on the prompt
19
+ modified_code = generator(
20
+ f"{prompt}\n{code}",
21
+ max_new_tokens=500, # Generate up to 500 new tokens
22
+ num_return_sequences=1
23
+ )[0]['generated_text']
24
 
25
  # Truncate the output to a maximum of 793,833 lines (or characters)
26
  max_lines = 793833