justinj92 commited on
Commit
8444eb1
·
verified ·
1 Parent(s): 833e9bd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -45,9 +45,9 @@ def process(
45
  image_input,
46
  image_prompter_input
47
  ) -> Tuple[Optional[Image.Image], Optional[str]]:
48
- model = MODELS["microsoft/Florence-2-large-ft"]
49
- processor = PROCESSORS["microsoft/Florence-2-large-ft"]
50
- task = TASKS["microsoft/Florence-2-large-ft"]
51
 
52
  if task_dropdown in IMAGE_TO_IMAGE_TASK_NAMES:
53
  _, response = run_inference(
@@ -89,7 +89,7 @@ with gr.Blocks() as demo:
89
  with gr.Row():
90
  checkpoint_dropdown_component = gr.Dropdown(
91
  choices=CHECKPOINTS,
92
- value=CHECKPOINTS[0],
93
  label="Model", info="Select a Florence 2 model to use.",
94
  interactive=True
95
  )
 
45
  image_input,
46
  image_prompter_input
47
  ) -> Tuple[Optional[Image.Image], Optional[str]]:
48
+ model = MODELS[checkpoint_dropdown]
49
+ processor = PROCESSORS[checkpoint_dropdown]
50
+ task = TASKS[task_dropdown]
51
 
52
  if task_dropdown in IMAGE_TO_IMAGE_TASK_NAMES:
53
  _, response = run_inference(
 
89
  with gr.Row():
90
  checkpoint_dropdown_component = gr.Dropdown(
91
  choices=CHECKPOINTS,
92
+ value="microsoft/Florence-2-large-ft",
93
  label="Model", info="Select a Florence 2 model to use.",
94
  interactive=True
95
  )