harrim-nv commited on
Commit
89f2153
·
verified ·
1 Parent(s): 120332b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -23
app.py CHANGED
@@ -189,30 +189,31 @@ with gr.Blocks(title="Cosmos-Reason1", theme=gr.themes.Soft()) as demo:
189
  gr.Markdown("# Cosmos-Reason1")
190
  gr.Markdown("Upload an image or video and ask a question about it.")
191
 
192
- with gr.Accordion("Model Configuration", open=False):
193
- attention_mode = gr.Dropdown(
194
- choices=["sdpa", "xformers", "flash_attention_2"],
195
- value=config["attention_mode"],
196
- label="Attention Mode"
197
- )
198
- torch_dtype = gr.Dropdown(
199
- choices=["float16", "bfloat16", "float32"],
200
- value=config["torch_dtype"],
201
- label="Torch Data Type"
202
- )
203
- device_map = gr.Dropdown(
204
- choices=["auto", "cuda", "cpu"],
205
- value=config["device_map"],
206
- label="Device Map"
207
- )
208
- config_btn = gr.Button("Apply Configuration")
209
- config_msg = gr.Markdown()
210
 
211
- config_btn.click(
212
- fn=apply_config_changes,
213
- inputs=[attention_mode, torch_dtype, device_map],
214
- outputs=config_msg
215
- )
 
216
 
217
  with gr.Row():
218
  with gr.Column():
 
189
  gr.Markdown("# Cosmos-Reason1")
190
  gr.Markdown("Upload an image or video and ask a question about it.")
191
 
192
+ # with gr.Accordion("Model Configuration", open=False):
193
+ # attention_mode = gr.Dropdown(
194
+ # choices=["sdpa", "xformers", "flash_attention_2"],
195
+ # value=config["attention_mode"],
196
+ # label="Attention Mode"
197
+ # )
198
+ # torch_dtype = gr.Dropdown(
199
+ # choices=["float16", "bfloat16", "float32"],
200
+ # value=config["torch_dtype"],
201
+ # label="Torch Data Type"
202
+ # )
203
+ # device_map = gr.Dropdown(
204
+ # choices=["auto", "cuda", "cpu"],
205
+ # value=config["device_map"],
206
+ # label="Device Map"
207
+ # )
208
+ # config_btn = gr.Button("Apply Configuration")
209
+ # config_msg = gr.Markdown()
210
 
211
+ # config_btn.click(
212
+ # fn=apply_config_changes,
213
+ # inputs=[attention_mode, torch_dtype, device_map],
214
+ # outputs=config_msg
215
+ # )
216
+
217
 
218
  with gr.Row():
219
  with gr.Column():