badaoui HF Staff commited on
Commit
96104e4
·
verified ·
1 Parent(s): 28a9b63

change layout

Browse files
Files changed (1) hide show
  1. app.py +28 -21
app.py CHANGED
@@ -69,8 +69,8 @@ TITLE_IMAGE = """
69
  """
70
 
71
  TITLE = """
72
- <div style="display: inline-flex; align-items: center; text-align: center; max-width: 1400px; gap: 0.8rem; font-size: 2.2rem;">
73
- <h1 style="font-weight: 900; margin-bottom: 10px; margin-top: 10px;">
74
  🤗 Optimum Neuron Model Exporter (WIP)
75
  </h1>
76
  </div>
@@ -78,11 +78,13 @@ TITLE = """
78
 
79
  DESCRIPTION = """
80
  Export 🤗 Transformers models hosted on the Hugging Face Hub to AWS Neuron-optimized format for Inferentia/Trainium acceleration.
81
- *Features:*
 
82
  - Automatically opens PR with Neuron-optimized model
83
  - Preserves original model weights
84
  - Adds proper tags to model card
85
- *Note:*
 
86
  - PR creation requires the Space owner to have a valid write token set via HF_WRITE_TOKEN
87
  """
88
 
@@ -143,26 +145,31 @@ CUSTOM_CSS = """
143
  """
144
 
145
  with gr.Blocks(css=CUSTOM_CSS) as demo:
 
146
  gr.HTML(TITLE_IMAGE)
147
  gr.HTML(TITLE)
148
-
 
 
 
 
149
  with gr.Row():
150
- with gr.Column(scale=50):
151
- gr.Markdown(DESCRIPTION)
152
-
153
- with gr.Column(scale=50):
154
- input_model = HuggingfaceHubSearch(
155
- label="Hub model ID",
156
- placeholder="Search for model ID on the hub",
157
- search_type="model",
158
- )
159
- input_task = gr.Textbox(
160
- value="auto",
161
- max_lines=1,
162
- label='Task (can be left to "auto", will be automatically inferred)',
163
- )
164
- btn = gr.Button("Export to Neuron")
165
- output = gr.Markdown(label="Output")
166
 
167
  btn.click(
168
  fn=neuron_export,
 
69
  """
70
 
71
  TITLE = """
72
+ <div style="text-align: center; max-width: 1400px; margin: 0 auto;">
73
+ <h1 style="font-weight: 900; margin-bottom: 10px; margin-top: 10px; font-size: 2.2rem;">
74
  🤗 Optimum Neuron Model Exporter (WIP)
75
  </h1>
76
  </div>
 
78
 
79
  DESCRIPTION = """
80
  Export 🤗 Transformers models hosted on the Hugging Face Hub to AWS Neuron-optimized format for Inferentia/Trainium acceleration.
81
+
82
+ **Features:**
83
  - Automatically opens PR with Neuron-optimized model
84
  - Preserves original model weights
85
  - Adds proper tags to model card
86
+
87
+ **Note:**
88
  - PR creation requires the Space owner to have a valid write token set via HF_WRITE_TOKEN
89
  """
90
 
 
145
  """
146
 
147
  with gr.Blocks(css=CUSTOM_CSS) as demo:
148
+ # Centered title and image
149
  gr.HTML(TITLE_IMAGE)
150
  gr.HTML(TITLE)
151
+
152
+ # Full-width description
153
+ gr.Markdown(DESCRIPTION)
154
+
155
+ # Input controls in a row at the bottom
156
  with gr.Row():
157
+ input_model = HuggingfaceHubSearch(
158
+ label="Hub model ID",
159
+ placeholder="Search for model ID on the hub",
160
+ search_type="model",
161
+ )
162
+ input_task = gr.Textbox(
163
+ value="auto",
164
+ max_lines=1,
165
+ label='Task (can be left to "auto", will be automatically inferred)',
166
+ )
167
+
168
+ # Export button below the inputs
169
+ btn = gr.Button("Export to Neuron", size="lg")
170
+
171
+ # Output section
172
+ output = gr.Markdown(label="Output")
173
 
174
  btn.click(
175
  fn=neuron_export,