Update app.py
Browse files
app.py
CHANGED
|
@@ -158,13 +158,14 @@ def humanize(req: HumanizeRequest):
|
|
| 158 |
prompt = build_prompt(req.text, req.section, req.author_notes)
|
| 159 |
|
| 160 |
try:
|
| 161 |
-
response = llm(
|
| 162 |
-
prompt,
|
| 163 |
max_tokens=400,
|
| 164 |
temperature=0.4,
|
| 165 |
top_p=0.9,
|
| 166 |
-
|
| 167 |
)
|
|
|
|
| 168 |
except Exception as e:
|
| 169 |
raise HTTPException(
|
| 170 |
status_code=500,
|
|
|
|
| 158 |
prompt = build_prompt(req.text, req.section, req.author_notes)
|
| 159 |
|
| 160 |
try:
|
| 161 |
+
response = llm.create_completion(
|
| 162 |
+
prompt=prompt,
|
| 163 |
max_tokens=400,
|
| 164 |
temperature=0.4,
|
| 165 |
top_p=0.9,
|
| 166 |
+
repeat_penalty=1.1,
|
| 167 |
)
|
| 168 |
+
|
| 169 |
except Exception as e:
|
| 170 |
raise HTTPException(
|
| 171 |
status_code=500,
|