Spaces:
Sleeping
Sleeping
Better message formatting
Browse files
app.py
CHANGED
@@ -26,7 +26,7 @@ def look_up_tflite(repo_id):
|
|
26 |
for tflite_path in tflite_files:
|
27 |
tflite_file = os.path.basename(tflite_path)
|
28 |
print(f"Found tflite file: {tflite_file}")
|
29 |
-
tflite_message += f"Found tflite file {tflite_file} - Running cycle estimation\n"
|
30 |
return f"```\n{result.stdout}\n```\n{tflite_message}\n(This is an automated message)"
|
31 |
|
32 |
def post_discussion_comment(repo_id, discussion_num, message):
|
@@ -74,7 +74,7 @@ async def handle_webhook(request: Request):
|
|
74 |
|
75 |
try:
|
76 |
ls_result = look_up_tflite(repo_id)
|
77 |
-
post_discussion_comment(repo_id, discussion_num, f"
|
78 |
except Exception as e:
|
79 |
post_discussion_comment(repo_id, discussion_num, f"Error running ls: {e}")
|
80 |
|
|
|
26 |
for tflite_path in tflite_files:
|
27 |
tflite_file = os.path.basename(tflite_path)
|
28 |
print(f"Found tflite file: {tflite_file}")
|
29 |
+
tflite_message += f" ⚙️ Found tflite file **{tflite_file}** - Running cycle estimation\n"
|
30 |
return f"```\n{result.stdout}\n```\n{tflite_message}\n(This is an automated message)"
|
31 |
|
32 |
def post_discussion_comment(repo_id, discussion_num, message):
|
|
|
74 |
|
75 |
try:
|
76 |
ls_result = look_up_tflite(repo_id)
|
77 |
+
post_discussion_comment(repo_id, discussion_num, f"❗A conversion was successful for Repo **{repo_id}** \n Starting cycle estimation \n Cloning the repo \n {ls_result}")
|
78 |
except Exception as e:
|
79 |
post_discussion_comment(repo_id, discussion_num, f"Error running ls: {e}")
|
80 |
|