zwq2018 commited on
Commit
ec84951
·
1 Parent(s): c6944b5
Files changed (2) hide show
  1. app.py +3 -2
  2. main.py +3 -2
app.py CHANGED
@@ -84,17 +84,18 @@ with gr.Blocks() as demo:
84
  A powerful AI system connects humans and data.
85
 
86
  ## The current version only supports **Chinese financial data**, in the future we will support for other country data
87
- ### 由于数据源和模型输入的限制,当前接入的数据源和设计功能较有限,欢迎合作
88
  """)
89
 
90
 
91
  with gr.Row():
92
  with gr.Column(scale=0.9):
93
- input_text = gr.inputs.Textbox(lines=1, placeholder='Please input your problem...', label='what do you want to find? Then press Start ')
94
  gr.Markdown(
95
  """
96
  ### Step1-输入你的问题然后点击Start
97
  """)
 
 
98
 
99
 
100
  with gr.Column(scale=0.1, min_width=0):
 
84
  A powerful AI system connects humans and data.
85
 
86
  ## The current version only supports **Chinese financial data**, in the future we will support for other country data
87
+ ### 由于数据源和模型输入的限制,当前接入的数据源和设计功能较有限,资金有限接口速度很慢请谅解,欢迎合作
88
  """)
89
 
90
 
91
  with gr.Row():
92
  with gr.Column(scale=0.9):
 
93
  gr.Markdown(
94
  """
95
  ### Step1-输入你的问题然后点击Start
96
  """)
97
+ input_text = gr.inputs.Textbox(lines=1, placeholder='Please input your problem...', label='what do you want to find? Then press Start ')
98
+
99
 
100
 
101
  with gr.Column(scale=0.1, min_width=0):
main.py CHANGED
@@ -21,7 +21,8 @@ from threading import Thread
21
  # plt.rcParams['axes.unicode_minus'] = False
22
  import openai
23
 
24
-
 
25
  # To override the Thread method
26
  class MyThread(Thread):
27
 
@@ -348,7 +349,7 @@ def run(instruction, add_to_queue=None, send_chat_request_Azure = send_official_
348
 
349
  print(output_result)
350
  buf = BytesIO()
351
- plt.savefig(buf, format='png')
352
  buf.seek(0)
353
  #
354
  #
 
21
  # plt.rcParams['axes.unicode_minus'] = False
22
  import openai
23
 
24
+ font_path = './fonts/SimHei.ttf'
25
+ font_prop = fm.FontProperties()
26
  # To override the Thread method
27
  class MyThread(Thread):
28
 
 
349
 
350
  print(output_result)
351
  buf = BytesIO()
352
+ plt.savefig(buf, format='png', fontproperties=font_prop)
353
  buf.seek(0)
354
  #
355
  #