tdoehmen commited on
Commit
32bd6d6
·
1 Parent(s): 154859a
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -13,7 +13,6 @@ def gradio_run_evaluation(inference_api, model_name, prompt_format, openrouter_t
13
  if inference_api == "openrouter":
14
  os.environ["OPENROUTER_API_KEY"] = str(openrouter_token)
15
 
16
- # We now pass both the format name and content to evaluation
17
  output = []
18
  for result in run_evaluation(inference_api, str(model_name).strip(), prompt_format, custom_prompt):
19
  output.append(result)
@@ -94,10 +93,9 @@ with gr.Blocks(gr.themes.Soft()) as demo:
94
  outputs=[custom_prompt]
95
  )
96
 
97
- # Just switch to custom mode when editing starts
98
- custom_prompt.change(
99
- fn=lambda _: "custom",
100
- inputs=None,
101
  outputs=prompt_format
102
  )
103
 
 
13
  if inference_api == "openrouter":
14
  os.environ["OPENROUTER_API_KEY"] = str(openrouter_token)
15
 
 
16
  output = []
17
  for result in run_evaluation(inference_api, str(model_name).strip(), prompt_format, custom_prompt):
18
  output.append(result)
 
93
  outputs=[custom_prompt]
94
  )
95
 
96
+ # Switch to custom mode when editing starts
97
+ custom_prompt.input( # Using input instead of change
98
+ fn=lambda: "custom",
 
99
  outputs=prompt_format
100
  )
101