Spaces:
Runtime error
Runtime error
zwq2018
commited on
Commit
•
54aa51a
1
Parent(s):
33e08b4
add chinese fonts
Browse files
main.py
CHANGED
@@ -26,7 +26,7 @@ import openai
|
|
26 |
|
27 |
|
28 |
font_path = './fonts/SimHei.ttf'
|
29 |
-
font_prop = fm.FontProperties()
|
30 |
# To override the Thread method
|
31 |
class MyThread(Thread):
|
32 |
|
@@ -353,7 +353,7 @@ def run(instruction, add_to_queue=None, send_chat_request_Azure = send_official_
|
|
353 |
|
354 |
print(output_result)
|
355 |
buf = BytesIO()
|
356 |
-
plt.savefig(buf, format='png', fontproperties=font_prop
|
357 |
buf.seek(0)
|
358 |
#
|
359 |
#
|
|
|
26 |
|
27 |
|
28 |
font_path = './fonts/SimHei.ttf'
|
29 |
+
font_prop = fm.FontProperties(font_path)
|
30 |
# To override the Thread method
|
31 |
class MyThread(Thread):
|
32 |
|
|
|
353 |
|
354 |
print(output_result)
|
355 |
buf = BytesIO()
|
356 |
+
plt.savefig(buf, format='png', fontproperties=font_prop)
|
357 |
buf.seek(0)
|
358 |
#
|
359 |
#
|
tool.py
CHANGED
@@ -23,7 +23,7 @@ from sklearn.linear_model import LinearRegression
|
|
23 |
|
24 |
|
25 |
font_path = './fonts/SimHei.ttf'
|
26 |
-
font_prop = fm.FontProperties()
|
27 |
|
28 |
|
29 |
tushare_token = os.getenv('TUSHARE_TOKEN')
|
|
|
23 |
|
24 |
|
25 |
font_path = './fonts/SimHei.ttf'
|
26 |
+
font_prop = fm.FontProperties(font_path)
|
27 |
|
28 |
|
29 |
tushare_token = os.getenv('TUSHARE_TOKEN')
|