xiaoyao9184 commited on
Commit
84b4035
·
verified ·
1 Parent(s): d2c23bb

Synced repo using 'sync_with_huggingface' Github Action

Browse files

original:
- remote: "https://github.com/xiaoyao9184/convert-to-genai"
- commit: "78a7973f908f494cdfddf148fd18db3467371680"
sync_with_huggingface:
- repository: ""
- ref: ""

Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -202,7 +202,7 @@ class ModelConverter:
202
 
203
  def __init__(self, config: Config, context: contextvars.ContextVar):
204
  self.config = config
205
- self.api = HfApi(token=config.hf_token)
206
  self.context = context
207
 
208
  def list_tasks(self):
@@ -263,7 +263,7 @@ class ModelConverter:
263
  )
264
 
265
  extra_options = name_extra_options_map[name]
266
- extra_options['hf_token'] = "false" if self.config.hf_token == None else self.config.hf_token
267
 
268
  try:
269
  yield {
 
202
 
203
  def __init__(self, config: Config, context: contextvars.ContextVar):
204
  self.config = config
205
+ self.api = HfApi(token=config.hf_token or None)
206
  self.context = context
207
 
208
  def list_tasks(self):
 
263
  )
264
 
265
  extra_options = name_extra_options_map[name]
266
+ extra_options['hf_token'] = self.config.hf_token or "false"
267
 
268
  try:
269
  yield {