Felix Marty commited on
Commit
d181dd0
β€’
1 Parent(s): 03f6f0b
Files changed (1) hide show
  1. app.py +15 -4
app.py CHANGED
@@ -59,11 +59,20 @@ def onnx_export(token: str, model_id: str, task: str) -> str:
59
  TTILE = """
60
  <div style="text-align: center; max-width: 700px; margin: 0 auto;">
61
  <img src="https://huggingface.co/spaces/optimum/exporters/resolve/main/clean_hf_onnx.png"/>
62
- <div>
63
- <h1 style="font-weight: 900; margin-bottom: 7px; margin-top: 5px;">
64
- Convert any PyTorch model to ONNX with πŸ€— Optimum exporters 🏎️
 
 
 
 
 
 
 
 
65
  </h1>
66
  </div>
 
67
  </div>
68
  """
69
 
@@ -92,9 +101,11 @@ with gr.Blocks() as demo:
92
  input_token = gr.Textbox(max_lines=1, label="Hugging Face token")
93
  input_model = gr.Textbox(max_lines=1, label="Model name", placeholder="textattack/distilbert-base-cased-CoLA")
94
  input_task = gr.Textbox(value="auto", max_lines=1, label="Task (can be left blank, will be automatically inferred)")
 
 
95
  output = gr.Markdown(label="Output")
96
 
97
- btn = gr.Button("Convert to ONNX")
98
  btn.click(fn=onnx_export, inputs=[input_token, input_model, input_task], outputs=output)
99
 
100
  """
 
59
  TTILE = """
60
  <div style="text-align: center; max-width: 700px; 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
+ "
70
+ >
71
+ <h1 style="font-weight: 900; margin-bottom: 10px; margin-top: 10px;">
72
+ Convert any PyTorch model to ONNX with πŸ€— Optimum exporters 🏎️ (Beta)
73
  </h1>
74
  </div>
75
+
76
  </div>
77
  """
78
 
 
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")
107
 
108
+
109
  btn.click(fn=onnx_export, inputs=[input_token, input_model, input_task], outputs=output)
110
 
111
  """