Yijun-Yang commited on
Commit
05ac4f8
·
1 Parent(s): 2f92eaa

updatezerogpuparam

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -99,7 +99,7 @@ def update_remote_config(remote_ornot,remote_company = None,api = None,model = N
99
  pytoml.dump(config, f)
100
  return gr.Button("配置已保存")
101
 
102
- @spaces.GPU(duration=360)
103
  def get_ready(query:str,chunksize=None,k=None):
104
 
105
  with open(CONFIG_PATH, encoding='utf8') as f:
@@ -297,7 +297,7 @@ def update_ncluster_dropdown(chunksize:int):
297
  nclusters = jsonobj[chunksize]
298
  return gr.Dropdown(choices= nclusters)
299
 
300
- @spaces.GPU(duration=360)
301
  def annotation(n,chunksize:int,nclusters:int,remote_ornot:bool):
302
  '''
303
  use llm to annotate cluster
@@ -337,7 +337,7 @@ def annotation(n,chunksize:int,nclusters:int,remote_ornot:bool):
337
 
338
  return '\n\n'.join([obj['annotation'] for obj in new_obj_list])
339
 
340
- @spaces.GPU(duration=360)
341
  def inspiration(annotation:str,chunksize:int,nclusters:int,remote_ornot:bool):
342
  query = 'inspiration'
343
  if remote_ornot:
@@ -386,7 +386,7 @@ def getpmcurls(references):
386
  urls.append(ref)
387
  return urls
388
 
389
- @spaces.GPU(duration=360)
390
  def summarize_text(query,chunksize:int,remote_ornot:bool):
391
  if remote_ornot:
392
  backend = 'remote'
 
99
  pytoml.dump(config, f)
100
  return gr.Button("配置已保存")
101
 
102
+ # @spaces.GPU(duration=360)
103
  def get_ready(query:str,chunksize=None,k=None):
104
 
105
  with open(CONFIG_PATH, encoding='utf8') as f:
 
297
  nclusters = jsonobj[chunksize]
298
  return gr.Dropdown(choices= nclusters)
299
 
300
+ # @spaces.GPU(duration=360)
301
  def annotation(n,chunksize:int,nclusters:int,remote_ornot:bool):
302
  '''
303
  use llm to annotate cluster
 
337
 
338
  return '\n\n'.join([obj['annotation'] for obj in new_obj_list])
339
 
340
+ # @spaces.GPU(duration=360)
341
  def inspiration(annotation:str,chunksize:int,nclusters:int,remote_ornot:bool):
342
  query = 'inspiration'
343
  if remote_ornot:
 
386
  urls.append(ref)
387
  return urls
388
 
389
+ # @spaces.GPU(duration=360)
390
  def summarize_text(query,chunksize:int,remote_ornot:bool):
391
  if remote_ornot:
392
  backend = 'remote'