Spaces:
Running
Running
阳渠
commited on
Commit
·
5f040af
1
Parent(s):
09b417a
Update
Browse files
app.py
CHANGED
@@ -38,7 +38,7 @@ def download_file(url, save_path):
|
|
38 |
for chunk in response.iter_content(chunk_size=8192): # 分块写入,防止占用过多内存
|
39 |
file.write(chunk)
|
40 |
|
41 |
-
download_file(tff_file, "
|
42 |
|
43 |
chatbot_css = """
|
44 |
<style>
|
@@ -298,7 +298,7 @@ def chatbot(image, instruction, add_info, history, chat_log):
|
|
298 |
screenshot_file = os.path.join(screenshot_root, f"screenshot_{current_time}.png")
|
299 |
image.save(screenshot_file, format="PNG")
|
300 |
screenshot_som_file = screenshot_file.split(".")[0] + "_som." + screenshot_file.split(".")[1]
|
301 |
-
perception_infos, width, height = get_perception_infos(screenshot_file, screenshot_som_file, font_path="
|
302 |
shutil.rmtree(temp_file)
|
303 |
os.mkdir(temp_file)
|
304 |
|
|
|
38 |
for chunk in response.iter_content(chunk_size=8192): # 分块写入,防止占用过多内存
|
39 |
file.write(chunk)
|
40 |
|
41 |
+
download_file(tff_file, "arial.ttf")
|
42 |
|
43 |
chatbot_css = """
|
44 |
<style>
|
|
|
298 |
screenshot_file = os.path.join(screenshot_root, f"screenshot_{current_time}.png")
|
299 |
image.save(screenshot_file, format="PNG")
|
300 |
screenshot_som_file = screenshot_file.split(".")[0] + "_som." + screenshot_file.split(".")[1]
|
301 |
+
perception_infos, width, height = get_perception_infos(screenshot_file, screenshot_som_file, font_path="arial.ttf")
|
302 |
shutil.rmtree(temp_file)
|
303 |
os.mkdir(temp_file)
|
304 |
|