Spaces:
Running
Running
Synced repo using 'sync_with_huggingface' Github Action
Browse filesoriginal:
- remote: "https://github.com/xiaoyao9184/convert-to-genai"
- commit: "78a7973f908f494cdfddf148fd18db3467371680"
sync_with_huggingface:
- repository: ""
- ref: ""
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'] =
|
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 {
|