99i commited on
Commit
5be5932
·
verified ·
1 Parent(s): e949e36

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -29,7 +29,7 @@ class Markdown(BaseModel):
29
  markdown: str
30
 
31
  # 创建一个路由,用于接收 markdown 字符串并生成图片
32
- @app.post("/generate_image")
33
  async def generate_image_endpoint(markdown: Markdown):
34
  # 生成随机文件名
35
  image_filename = 'tmp/'+str(uuid.uuid4()) + ".png"
@@ -48,7 +48,7 @@ def clean_expired_images():
48
  os.remove(file_path)
49
 
50
  # 创建一个路由,用于触发清理过期的图片
51
- @app.delete("/clean_images")
52
  async def clean_images_endpoint():
53
  # 调用 clean_expired_images 函数来清理过期的图片
54
  clean_expired_images()
 
29
  markdown: str
30
 
31
  # 创建一个路由,用于接收 markdown 字符串并生成图片
32
+ @app.post("/t2c")
33
  async def generate_image_endpoint(markdown: Markdown):
34
  # 生成随机文件名
35
  image_filename = 'tmp/'+str(uuid.uuid4()) + ".png"
 
48
  os.remove(file_path)
49
 
50
  # 创建一个路由,用于触发清理过期的图片
51
+ @app.delete("/ci")
52
  async def clean_images_endpoint():
53
  # 调用 clean_expired_images 函数来清理过期的图片
54
  clean_expired_images()