Synced repo using 'sync_with_huggingface' Github Action
Browse files
main.py
CHANGED
|
@@ -193,7 +193,9 @@ def main():
|
|
| 193 |
while True:
|
| 194 |
try:
|
| 195 |
# Dummy request to keep the Hugging Face Space awake
|
| 196 |
-
|
|
|
|
|
|
|
| 197 |
reply_to_mentions()
|
| 198 |
except Exception as e:
|
| 199 |
logger.error(e)
|
|
@@ -203,5 +205,5 @@ def main():
|
|
| 203 |
time.sleep(30)
|
| 204 |
|
| 205 |
|
| 206 |
-
|
| 207 |
-
|
|
|
|
| 193 |
while True:
|
| 194 |
try:
|
| 195 |
# Dummy request to keep the Hugging Face Space awake
|
| 196 |
+
logger.info("Pinging Hugging Face Space...")
|
| 197 |
+
requests.get("https://team6-roast.hf.space/", timeout=5)
|
| 198 |
+
logger.info("Replying to mentions...")
|
| 199 |
reply_to_mentions()
|
| 200 |
except Exception as e:
|
| 201 |
logger.error(e)
|
|
|
|
| 205 |
time.sleep(30)
|
| 206 |
|
| 207 |
|
| 208 |
+
if __name__ == "__main__":
|
| 209 |
+
main()
|