Felix Marty commited on
Commit
f1c3988
β€’
1 Parent(s): 595bd49
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -55,15 +55,15 @@ def onnx_export(token: str, model_id: str, task: str) -> str:
55
  except Exception as e:
56
  return f"#### Error: {e}"
57
 
58
-
59
  TTILE = """
60
- <div style="text-align: center; max-width: 1400px; margin: 0 auto;">
61
- <img src="https://huggingface.co/spaces/optimum/exporters/resolve/main/clean_hf_onnx.png"/>
62
 
63
  <div
64
  style="
65
  display: inline-flex;
66
  align-items: center;
 
 
67
  gap: 0.8rem;
68
  font-size: 2.2rem;
69
  "
@@ -71,8 +71,6 @@ TTILE = """
71
  <h1 style="font-weight: 900; margin-bottom: 10px; margin-top: 10px;">
72
  Convert transformers model to ONNX with πŸ€— Optimum exporters 🏎️ (Beta)
73
  </h1>
74
- </div>
75
-
76
  </div>
77
  """
78
 
@@ -100,7 +98,7 @@ with gr.Blocks() as demo:
100
  with gr.Column():
101
  input_token = gr.Textbox(max_lines=1, label="Hugging Face token")
102
  input_model = gr.Textbox(max_lines=1, label="Model name", placeholder="textattack/distilbert-base-cased-CoLA")
103
- input_task = gr.Textbox(value="auto", max_lines=1, label="Task (can be left blank, will be automatically inferred)")
104
 
105
  btn = gr.Button("Convert to ONNX")
106
  output = gr.Markdown(label="Output")
 
55
  except Exception as e:
56
  return f"#### Error: {e}"
57
 
 
58
  TTILE = """
59
+ <img src="https://huggingface.co/spaces/optimum/exporters/resolve/main/clean_hf_onnx.png" class="center"/>
 
60
 
61
  <div
62
  style="
63
  display: inline-flex;
64
  align-items: center;
65
+ text-align: center;
66
+ max-width: 1400px;
67
  gap: 0.8rem;
68
  font-size: 2.2rem;
69
  "
 
71
  <h1 style="font-weight: 900; margin-bottom: 10px; margin-top: 10px;">
72
  Convert transformers model to ONNX with πŸ€— Optimum exporters 🏎️ (Beta)
73
  </h1>
 
 
74
  </div>
75
  """
76
 
 
98
  with gr.Column():
99
  input_token = gr.Textbox(max_lines=1, label="Hugging Face token")
100
  input_model = gr.Textbox(max_lines=1, label="Model name", placeholder="textattack/distilbert-base-cased-CoLA")
101
+ input_task = gr.Textbox(value="auto", max_lines=1, label="Task (can be left to \"auto\", will be automatically inferred)")
102
 
103
  btn = gr.Button("Convert to ONNX")
104
  output = gr.Markdown(label="Output")