Narsil HF staff commited on
Commit
273db11
1 Parent(s): ff90924

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -1,6 +1,7 @@
1
  import gradio as gr
2
 
3
  from convert import convert
 
4
 
5
 
6
  def run(token: str, model_id: str) -> str:
@@ -13,7 +14,8 @@ def run(token: str, model_id: str) -> str:
13
  try:
14
  # TODO(Run this in a separate directory otherwise max_concurrency = 1...)
15
  # as filename of conversion is fixed.
16
- commit_info = convert(token=token, model_id=model_id)
 
17
  return f"""
18
  ### Success 🔥
19
 
 
1
  import gradio as gr
2
 
3
  from convert import convert
4
+ from huggingface_hub import HfApi
5
 
6
 
7
  def run(token: str, model_id: str) -> str:
 
14
  try:
15
  # TODO(Run this in a separate directory otherwise max_concurrency = 1...)
16
  # as filename of conversion is fixed.
17
+ api = HfApi(token=token)
18
+ commit_info = convert(api=api, model_id=model_id)
19
  return f"""
20
  ### Success 🔥
21