Spaces:
Running
Running
admin
commited on
Commit
·
e0039f4
1
Parent(s):
2dcea53
fix special marks
Browse files
app.py
CHANGED
@@ -25,15 +25,14 @@ def infer(cookie: str, step: int):
|
|
25 |
if not cookie:
|
26 |
raise ValueError("请输入 cookie !")
|
27 |
|
|
|
28 |
size = len(cookie)
|
29 |
count = math.ceil(size / step)
|
30 |
for i in range(count):
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
```
|
36 |
-
"""
|
37 |
|
38 |
except Exception as e:
|
39 |
status = f"{e}"
|
|
|
25 |
if not cookie:
|
26 |
raise ValueError("请输入 cookie !")
|
27 |
|
28 |
+
md_lines = []
|
29 |
size = len(cookie)
|
30 |
count = math.ceil(size / step)
|
31 |
for i in range(count):
|
32 |
+
md_lines.append(
|
33 |
+
f"```txt\n{cookie[i * step: min((i + 1) * step, size)]}\n```")
|
34 |
+
|
35 |
+
output = "\n".join(md_lines)
|
|
|
|
|
36 |
|
37 |
except Exception as e:
|
38 |
status = f"{e}"
|