Aggiornato il gestore della chat per impostare i valori predefiniti per il modello e la strategia nel dropdown.
This commit is contained in:
@@ -83,13 +83,15 @@ class ChatManager:
|
|||||||
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
|
||||||
|
|
||||||
style = gr.Dropdown(
|
strategy = gr.Dropdown(
|
||||||
choices=self.inputs.list_strategies_names(),
|
choices=self.inputs.list_strategies_names(),
|
||||||
type="index",
|
type="index",
|
||||||
label="Stile di investimento"
|
label="Stile di investimento"
|
||||||
)
|
)
|
||||||
style.change(fn=self.inputs.choose_strategy, inputs=style, 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