masanorihirano
commited on
Commit
•
8d4c909
1
Parent(s):
c040907
update
Browse files
app.py
CHANGED
@@ -164,6 +164,8 @@ def evaluate(
|
|
164 |
repetition_penalty=1.0,
|
165 |
):
|
166 |
try:
|
|
|
|
|
167 |
num_beams: int = 1
|
168 |
top_p: float = 0.75
|
169 |
top_k: int = 40
|
@@ -256,8 +258,10 @@ def evaluate(
|
|
256 |
"username": "Hugging Face Space",
|
257 |
"channel": "#monitor",
|
258 |
}
|
259 |
-
|
260 |
-
|
|
|
|
|
261 |
return (
|
262 |
"Error happend. Please return later.",
|
263 |
gr.update(interactive=True),
|
|
|
164 |
repetition_penalty=1.0,
|
165 |
):
|
166 |
try:
|
167 |
+
if temperature < 1e-8:
|
168 |
+
temperature = 1e-8
|
169 |
num_beams: int = 1
|
170 |
top_p: float = 0.75
|
171 |
top_k: int = 40
|
|
|
258 |
"username": "Hugging Face Space",
|
259 |
"channel": "#monitor",
|
260 |
}
|
261 |
+
try:
|
262 |
+
requests.post(SLACK_WEBHOOK, data=json.dumps(payload_dic))
|
263 |
+
except Exception:
|
264 |
+
pass
|
265 |
return (
|
266 |
"Error happend. Please return later.",
|
267 |
gr.update(interactive=True),
|