vlff李飞飞 commited on
Commit
aa4486a
1 Parent(s): 6a9dc3a

update logo

Browse files
browser_qwen/background.js CHANGED
@@ -5,7 +5,7 @@ function send_data(msg){
5
  console.log(result)
6
  if (result.access_token) {
7
  console.log('access_token currently is ' + result.access_token);
8
- database_url = "https://taohongxiu-qwen-agent.hf.space/endpoint";
9
  fetch(database_url, {
10
  method: "POST",
11
  headers: {
 
5
  console.log(result)
6
  if (result.access_token) {
7
  console.log('access_token currently is ' + result.access_token);
8
+ database_url = "https://llmbb-llmbb-agent.hf.space/endpoint";
9
  fetch(database_url, {
10
  method: "POST",
11
  headers: {
browser_qwen/img/logo.png CHANGED
browser_qwen/img/popup.jpg ADDED
browser_qwen/img/popup.png DELETED
Binary file (733 kB)
 
browser_qwen/manifest.json CHANGED
@@ -1,5 +1,5 @@
1
  {
2
- "name": "BrowserQwen",
3
  "description" : "An Extension Driven by LLM",
4
  "version": "1.0",
5
  "manifest_version": 3,
@@ -10,8 +10,8 @@
10
 
11
  "action": {
12
  "default_popup": "src/popup.html",
13
- "default_icon": "img/popup.png",
14
- "default_title": "BrowserQwen"
15
  },
16
  "permissions": [
17
  "tabs",
 
1
  {
2
+ "name": "BrowserLLMBB",
3
  "description" : "An Extension Driven by LLM",
4
  "version": "1.0",
5
  "manifest_version": 3,
 
10
 
11
  "action": {
12
  "default_popup": "src/popup.html",
13
+ "default_icon": "img/popup.jpg",
14
+ "default_title": "BrowserLLMBB"
15
  },
16
  "permissions": [
17
  "tabs",
browser_qwen/src/content.js CHANGED
@@ -29,7 +29,7 @@ button.style.position = 'fixed';
29
  button.style.top = '30px';
30
  button.style.right = '30px';
31
  button.style.zIndex = "9999";
32
- button.textContent = "Add to ChatGpt's Reading List";
33
  button.style.fontFamily = 'Arial, sans-serif';
34
  button.style.fontSize = '14px';
35
  button.style.width = '140px';
 
29
  button.style.top = '30px';
30
  button.style.right = '30px';
31
  button.style.zIndex = "9999";
32
+ button.textContent = "Add to LLMBB's Reading List";
33
  button.style.fontFamily = 'Arial, sans-serif';
34
  button.style.fontSize = '14px';
35
  button.style.width = '140px';
browser_qwen/src/popup.js CHANGED
@@ -29,7 +29,7 @@ document.addEventListener('DOMContentLoaded', function() {
29
  chrome.storage.local.get(['access_token'], function(result) {
30
  if (result.access_token) {
31
  console.log('access_token currently is ' + result.access_token);
32
- popup_url = "https://taohongxiu-qwen-agent.hf.space/?access_token"+access_token;
33
  var iframe = document.createElement('iframe');
34
  iframe.src = popup_url;
35
  iframe.height = '570px';
@@ -40,6 +40,7 @@ document.addEventListener('DOMContentLoaded', function() {
40
  }
41
  });
42
  }, 500);
 
43
 
44
  document.getElementById('set_access_token').addEventListener('click', function() {
45
  var access_token = document.getElementById('access_token').value;
@@ -49,4 +50,4 @@ document.getElementById('set_access_token').addEventListener('click', function()
49
  // chrome.runtime.sendMessage({ data: access_token , close: true , flag: 'set_access_token'});
50
  document.getElementById('access_token').value = '';
51
  });
52
- })
 
29
  chrome.storage.local.get(['access_token'], function(result) {
30
  if (result.access_token) {
31
  console.log('access_token currently is ' + result.access_token);
32
+ popup_url = "https://llmbb-llmbb-agent.hf.space/?access_token"+access_token;
33
  var iframe = document.createElement('iframe');
34
  iframe.src = popup_url;
35
  iframe.height = '570px';
 
40
  }
41
  });
42
  }, 500);
43
+ })
44
 
45
  document.getElementById('set_access_token').addEventListener('click', function() {
46
  var access_token = document.getElementById('access_token').value;
 
50
  // chrome.runtime.sendMessage({ data: access_token , close: true , flag: 'set_access_token'});
51
  document.getElementById('access_token').value = '';
52
  });
53
+ })
qwen_server/assistant_server.py CHANGED
@@ -83,7 +83,7 @@ def bot(history):
83
  now_page = None
84
  _ref = ''
85
  if not os.path.exists(cache_file):
86
- gr.Info("Please add this page to ChatGPT's Reading List first!")
87
  else:
88
  for line in jsonlines.open(cache_file):
89
  if line['url'] == PAGE_URL[-1]:
@@ -91,10 +91,10 @@ def bot(history):
91
 
92
  if not now_page:
93
  gr.Info(
94
- "This page has not yet been added to the ChatGPT's reading list!"
95
  )
96
  elif not now_page['raw']:
97
- gr.Info('Please reopen later, ChatGPT is analyzing this page...')
98
  else:
99
  _ref_list = mem.get(
100
  history[-1][0], [now_page],
@@ -132,16 +132,16 @@ def bot(history):
132
  def load_history_session(history):
133
  now_page = None
134
  if not os.path.exists(cache_file):
135
- gr.Info("Please add this page to ChatGPT's Reading List first!")
136
  return []
137
  for line in jsonlines.open(cache_file):
138
  if line['url'] == PAGE_URL[-1]:
139
  now_page = line
140
  if not now_page:
141
- gr.Info("Please add this page to ChatGPT's Reading List first!")
142
  return []
143
  if not now_page['raw']:
144
- gr.Info('Please wait, ChatGPT is analyzing this page...')
145
  return []
146
  return now_page['session']
147
 
@@ -178,7 +178,7 @@ with gr.Blocks(css=css, theme='soft') as demo:
178
  with gr.Row():
179
  with gr.Column(scale=7):
180
  txt = gr.Textbox(show_label=False,
181
- placeholder='Chat with ChatGPT...',
182
  container=False)
183
  # with gr.Column(scale=0.06, min_width=0):
184
  # smt_bt = gr.Button('⏎')
 
83
  now_page = None
84
  _ref = ''
85
  if not os.path.exists(cache_file):
86
+ gr.Info("Please add this page to LLMBB's Reading List first!")
87
  else:
88
  for line in jsonlines.open(cache_file):
89
  if line['url'] == PAGE_URL[-1]:
 
91
 
92
  if not now_page:
93
  gr.Info(
94
+ "This page has not yet been added to the LLMBB's reading list!"
95
  )
96
  elif not now_page['raw']:
97
+ gr.Info('Please reopen later, LLMBB is analyzing this page...')
98
  else:
99
  _ref_list = mem.get(
100
  history[-1][0], [now_page],
 
132
  def load_history_session(history):
133
  now_page = None
134
  if not os.path.exists(cache_file):
135
+ gr.Info("Please add this page to LLMBB's Reading List first!")
136
  return []
137
  for line in jsonlines.open(cache_file):
138
  if line['url'] == PAGE_URL[-1]:
139
  now_page = line
140
  if not now_page:
141
+ gr.Info("Please add this page to LLMBB's Reading List first!")
142
  return []
143
  if not now_page['raw']:
144
+ gr.Info('Please wait, LLMBB is analyzing this page...')
145
  return []
146
  return now_page['session']
147
 
 
178
  with gr.Row():
179
  with gr.Column(scale=7):
180
  txt = gr.Textbox(show_label=False,
181
+ placeholder='Chat with LLMBB...',
182
  container=False)
183
  # with gr.Column(scale=0.06, min_width=0):
184
  # smt_bt = gr.Button('⏎')
qwen_server/img/logo.png CHANGED
qwen_server/js/main.js CHANGED
@@ -29,7 +29,7 @@ var checkboxes = document.querySelectorAll('input[type="checkbox"]');
29
  checkboxes.forEach(function(checkbox) {
30
  checkbox.addEventListener("change", function() {
31
  console.log(location.hostname)
32
- var _server_url = "https://taohongxiu-qwen-agent.hf.space/endpoint";
33
  fetch(_server_url, {
34
  method: "POST",
35
  headers: {
 
29
  checkboxes.forEach(function(checkbox) {
30
  checkbox.addEventListener("change", function() {
31
  console.log(location.hostname)
32
+ var _server_url = "https://llmbb-llmbb-agent.hf.space/endpoint";
33
  fetch(_server_url, {
34
  method: "POST",
35
  headers: {