Spaces:
Runtime error
Runtime error
zwq2018
commited on
Commit
•
962f69c
1
Parent(s):
2ce6486
update
Browse files
app.py
CHANGED
@@ -24,7 +24,7 @@ css = """#col-container {max-width: 90%; margin-left: auto; margin-right: auto;
|
|
24 |
|
25 |
# plt.rcParams['font.sans-serif'] = ['WenQuanYi Zen Hei', 'Noto Sans CJK']
|
26 |
# plt.rcParams['axes.unicode_minus'] = False
|
27 |
-
plt.rcParams['font.family'] = 'SimHei'
|
28 |
|
29 |
example_stock =['给我画一下可孚医疗2022年年中到今天的股价','北向资金今年的每日流入和累计流入','看一下近三年宁德时代和贵州茅台的pb变化','画一下五粮液和泸州老窖从2019年年初到2022年年中的收益率走势','成都银行近一年的k线图和kdj指标','比较下沪深300,创业板指,中证1000指数今年的收益率','今年上证50所有成分股的收益率是多少']
|
30 |
example_economic =['中国过去十年的cpi走势是什么','过去五年中国的货币供应量走势,并且打印保存','我想看看现在的新闻或者最新的消息','我想看看中国近十年gdp的走势','预测中国未来12个季度的GDP增速']
|
@@ -50,10 +50,10 @@ class Client:
|
|
50 |
def run(self, messages):
|
51 |
|
52 |
# self.stop = False
|
53 |
-
self.OPENAI_KEY = os.getenv('OPENAI_API')
|
54 |
-
self.OPENAI_API_KEY_AZURE =
|
55 |
-
self.OPENAI_API_BASED_AZURE =
|
56 |
-
self.OPENAI_ENGINE_AZURE =
|
57 |
gen = gradio_interface(messages, self.OPENAI_KEY, self.OPENAI_API_KEY_AZURE, self.OPENAI_API_BASED_AZURE, self.OPENAI_ENGINE_AZURE)
|
58 |
while not self.stop: #
|
59 |
try:
|
|
|
24 |
|
25 |
# plt.rcParams['font.sans-serif'] = ['WenQuanYi Zen Hei', 'Noto Sans CJK']
|
26 |
# plt.rcParams['axes.unicode_minus'] = False
|
27 |
+
plt.rcParams['font.family'] = 'SimHei'
|
28 |
|
29 |
example_stock =['给我画一下可孚医疗2022年年中到今天的股价','北向资金今年的每日流入和累计流入','看一下近三年宁德时代和贵州茅台的pb变化','画一下五粮液和泸州老窖从2019年年初到2022年年中的收益率走势','成都银行近一年的k线图和kdj指标','比较下沪深300,创业板指,中证1000指数今年的收益率','今年上证50所有成分股的收益率是多少']
|
30 |
example_economic =['中国过去十年的cpi走势是什么','过去五年中国的货币供应量走势,并且打印保存','我想看看现在的新闻或者最新的消息','我想看看中国近十年gdp的走势','预测中国未来12个季度的GDP增速']
|
|
|
50 |
def run(self, messages):
|
51 |
|
52 |
# self.stop = False
|
53 |
+
self.OPENAI_KEY = '' #os.getenv('OPENAI_API')
|
54 |
+
self.OPENAI_API_KEY_AZURE = os.getenv('OPENAI_API_KEY_AZURE')
|
55 |
+
self.OPENAI_API_BASED_AZURE = os.getenv('OPENAI_API_BASED_AZURE')
|
56 |
+
self.OPENAI_ENGINE_AZURE = os.getenv('OPENAI_ENGINE_AZURE')
|
57 |
gen = gradio_interface(messages, self.OPENAI_KEY, self.OPENAI_API_KEY_AZURE, self.OPENAI_API_BASED_AZURE, self.OPENAI_ENGINE_AZURE)
|
58 |
while not self.stop: #
|
59 |
try:
|