Fix chat defaults #46
@@ -79,19 +79,19 @@ class ChatManager:
|
|||||||
with gr.Row():
|
with gr.Row():
|
||||||
provider = gr.Dropdown(
|
provider = gr.Dropdown(
|
||||||
choices=self.inputs.list_models_names(),
|
choices=self.inputs.list_models_names(),
|
||||||
|
value=self.inputs.team_leader_model.label,
|
||||||
type="index",
|
type="index",
|
||||||
|
|
|||||||
label="Modello da usare"
|
label="Modello da usare"
|
||||||
)
|
)
|
||||||
provider.change(fn=self.inputs.choose_team_leader, inputs=provider, outputs=None)
|
provider.change(fn=self.inputs.choose_team_leader, inputs=provider, outputs=None)
|
||||||
provider.value = self.inputs.team_leader_model.label
|
|
||||||
|
|
||||||
strategy = gr.Dropdown(
|
strategy = gr.Dropdown(
|
||||||
choices=self.inputs.list_strategies_names(),
|
choices=self.inputs.list_strategies_names(),
|
||||||
|
value=self.inputs.strategy.label,
|
||||||
type="index",
|
type="index",
|
||||||
label="Stile di investimento"
|
label="Stile di investimento"
|
||||||
)
|
)
|
||||||
strategy.change(fn=self.inputs.choose_strategy, inputs=strategy, outputs=None)
|
strategy.change(fn=self.inputs.choose_strategy, inputs=strategy, outputs=None)
|
||||||
strategy.value = self.inputs.strategy.label
|
|
||||||
|
|
||||||
chat = gr.ChatInterface(
|
chat = gr.ChatInterface(
|
||||||
fn=self.gradio_respond
|
fn=self.gradio_respond
|
||||||
|
|||||||
Reference in New Issue
Block a user
Setting
valuedirectly on a Gradio component after creation may not update the displayed default. Consider using thevalueparameter in thegr.Dropdown()constructor instead:value=self.inputs.team_leader_model.label.Setting
valuedirectly on a Gradio component after creation may not update the displayed default. Consider using thevalueparameter in thegr.Dropdown()constructor instead:value=self.inputs.strategy.label.