xiaolv commited on
Commit
ac1adc1
·
1 Parent(s): a4140e9

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -5
app.py CHANGED
@@ -5,7 +5,8 @@ import os
5
  from EdgeGPT import Chatbot, ConversationStyle
6
 
7
  # read cookie from local file
8
-
 
9
 
10
  async def get_model_reply(prompt,style,cookies,context=[]):
11
  # combines the new question with a previous context
@@ -31,11 +32,9 @@ async def get_model_reply(prompt,style,cookies,context=[]):
31
  # print(' ' + responses[-1][0])
32
  # print(' ' + responses[-1][1])
33
  with gr.Blocks() as dialog_app:
34
- with open('./cookies.json', 'r') as f:
35
- cookies = json.load(f)
36
 
37
- # with gr.Tab("Cookies"):
38
- # cookies = gr.Textbox(lines=2, label="输入bing.com中的cookies")
39
  with gr.Tab("New Bing Chat GPT4"):
40
  gr.Markdown("# 连接 new-bing 接口,用的是GPT4的接口")
41
  chatbot = gr.Chatbot()
 
5
  from EdgeGPT import Chatbot, ConversationStyle
6
 
7
  # read cookie from local file
8
+ # with open('./cookies.json', 'r') as f:
9
+ # cookies = json.load(f)
10
 
11
  async def get_model_reply(prompt,style,cookies,context=[]):
12
  # combines the new question with a previous context
 
32
  # print(' ' + responses[-1][0])
33
  # print(' ' + responses[-1][1])
34
  with gr.Blocks() as dialog_app:
 
 
35
 
36
+ with gr.Tab("Cookies"):
37
+ cookies = gr.Textbox(lines=2, label="输入bing.com中的cookies")
38
  with gr.Tab("New Bing Chat GPT4"):
39
  gr.Markdown("# 连接 new-bing 接口,用的是GPT4的接口")
40
  chatbot = gr.Chatbot()