datacipen commited on
Commit
30b6f68
·
verified ·
1 Parent(s): a457ad4

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +9 -9
main.py CHANGED
@@ -71,8 +71,8 @@ CONTENT_STYLE = {
71
  "border-left": "1px solid rgb(47,65,93)",
72
  }
73
 
74
- llm = ChatOpenAI(model_name="mistralai/Mistral-Small-3.1-24B-Instruct-2503", base_url=os.environ['BASEURL_ALBERT_API_KEY'], api_key=os.environ['ENDPOINT_ALBERT_API_KEY'])
75
- model = ChatOpenAI(model_name="mistralai/Mistral-Small-3.1-24B-Instruct-2503", base_url=os.environ['BASEURL_ALBERT_API_KEY'], api_key=os.environ['ENDPOINT_ALBERT_API_KEY'])
76
 
77
  OWNER = os.environ['GITHUB_OWNER'] # ou nom d'organisation
78
  REPO = os.environ['GITHUB_REPO']
@@ -878,7 +878,7 @@ app.layout = dmc.MantineProvider(
878
  dcc.Location(id='redirect', refresh=True),
879
  dcc.Store(id='login-status', storage_type='session'),
880
  dcc.Store(id="history-store", storage_type="session", data=[]),
881
- dcc.Store(id="model-params-store", storage_type="session", data={"model": "mistralai/Mistral-Small-3.1-24B-Instruct-2503","temperature": 0.7,"max_tokens": 1024,"top_p": 0.9}),
882
  html.Div(id='user-status-div'),
883
  html.Div(id='page-content')
884
  ])])
@@ -890,7 +890,7 @@ def layout(**kwargs):
890
  dcc.Location(id='redirect', refresh=True),
891
  dcc.Store(id='login-status', storage_type='session'),
892
  dcc.Store(id="history-store", storage_type="session", data=[]),
893
- dcc.Store(id="model-params-store", storage_type="session", data={"model": "mistralai/Mistral-Small-3.1-24B-Instruct-2503","temperature": 0.7,"max_tokens": 1024,"top_p": 0.9}),
894
  html.Div(id='user-status-div'),
895
  html.Div(id='page-content')
896
  ]),
@@ -913,9 +913,9 @@ app_page = dmc.MantineProvider(
913
  {"label": "deepseek R1 8b llama", "value": "deepseek-r1:8b-llama-distill-q4_K_M"},
914
  {"label": "phi4 14b", "value": "phi4:14b-q8_0"},
915
  {"label": "gemma3 27b", "value": "gemma3:27b"},
916
- {"label": "Mistral Small 3.1 24B", "value": "mistralai/Mistral-Small-3.1-24B-Instruct-2503"},
917
  ],
918
- value="mistralai/Mistral-Small-3.1-24B-Instruct-2503", style={"font-size": "0.75rem","color": "rgb(80,106,139)"},
919
  ),
920
  ], style={"margin-bottom": "20px"}),
921
 
@@ -1304,9 +1304,9 @@ app_avid_page = dmc.MantineProvider(
1304
  {"label": "deepseek R1 8b llama", "value": "deepseek-r1:8b-llama-distill-q4_K_M"},
1305
  {"label": "phi4 14b", "value": "phi4:14b-q8_0"},
1306
  {"label": "gemma3 27b", "value": "gemma3:27b"},
1307
- {"label": "Mistral Small 3.1 24B", "value": "mistralai/Mistral-Small-3.1-24B-Instruct-2503"},
1308
  ],
1309
- value="mistralai/Mistral-Small-3.1-24B-Instruct-2503", style={"font-size": "0.75rem","color": "rgb(80,106,139)"},
1310
  ),
1311
  ], style={"margin-bottom": "20px"}),
1312
 
@@ -2023,7 +2023,7 @@ def generate_competence(requete, categorie_selected, n_clicks, categorie, enseig
2023
  """
2024
  # Simulation de l'appel à l'API LLM (à remplacer par un vrai appel API)
2025
  try:
2026
- if model_params["model"] == "mistralai/Mistral-Small-3.1-24B-Instruct-2503":
2027
  baseURL = os.environ['BASEURL_ALBERT_API_KEY']
2028
  os.environ['ENDPOINT_API_KEY'] = os.environ['ENDPOINT_ALBERT_API_KEY']
2029
  else:
 
71
  "border-left": "1px solid rgb(47,65,93)",
72
  }
73
 
74
+ llm = ChatOpenAI(model_name="albert-large", base_url=os.environ['BASEURL_ALBERT_API_KEY'], api_key=os.environ['ENDPOINT_ALBERT_API_KEY'])
75
+ model = ChatOpenAI(model_name="albert-large", base_url=os.environ['BASEURL_ALBERT_API_KEY'], api_key=os.environ['ENDPOINT_ALBERT_API_KEY'])
76
 
77
  OWNER = os.environ['GITHUB_OWNER'] # ou nom d'organisation
78
  REPO = os.environ['GITHUB_REPO']
 
878
  dcc.Location(id='redirect', refresh=True),
879
  dcc.Store(id='login-status', storage_type='session'),
880
  dcc.Store(id="history-store", storage_type="session", data=[]),
881
+ dcc.Store(id="model-params-store", storage_type="session", data={"model": "mistralai/Mistral-Small-3.2-24B-Instruct-2506","temperature": 0.7,"max_tokens": 1024,"top_p": 0.9}),
882
  html.Div(id='user-status-div'),
883
  html.Div(id='page-content')
884
  ])])
 
890
  dcc.Location(id='redirect', refresh=True),
891
  dcc.Store(id='login-status', storage_type='session'),
892
  dcc.Store(id="history-store", storage_type="session", data=[]),
893
+ dcc.Store(id="model-params-store", storage_type="session", data={"model": "mistralai/Mistral-Small-3.2-24B-Instruct-2506","temperature": 0.7,"max_tokens": 1024,"top_p": 0.9}),
894
  html.Div(id='user-status-div'),
895
  html.Div(id='page-content')
896
  ]),
 
913
  {"label": "deepseek R1 8b llama", "value": "deepseek-r1:8b-llama-distill-q4_K_M"},
914
  {"label": "phi4 14b", "value": "phi4:14b-q8_0"},
915
  {"label": "gemma3 27b", "value": "gemma3:27b"},
916
+ {"label": "Mistral Small 3.2 24B", "value": "mistralai/Mistral-Small-3.2-24B-Instruct-2506"},
917
  ],
918
+ value="mistralai/Mistral-Small-3.2-24B-Instruct-2506", style={"font-size": "0.75rem","color": "rgb(80,106,139)"},
919
  ),
920
  ], style={"margin-bottom": "20px"}),
921
 
 
1304
  {"label": "deepseek R1 8b llama", "value": "deepseek-r1:8b-llama-distill-q4_K_M"},
1305
  {"label": "phi4 14b", "value": "phi4:14b-q8_0"},
1306
  {"label": "gemma3 27b", "value": "gemma3:27b"},
1307
+ {"label": "Mistral Small 3.2 24B", "value": "mistralai/Mistral-Small-3.2-24B-Instruct-2506"},
1308
  ],
1309
+ value="mistralai/Mistral-Small-3.2-24B-Instruct-2506", style={"font-size": "0.75rem","color": "rgb(80,106,139)"},
1310
  ),
1311
  ], style={"margin-bottom": "20px"}),
1312
 
 
2023
  """
2024
  # Simulation de l'appel à l'API LLM (à remplacer par un vrai appel API)
2025
  try:
2026
+ if model_params["model"] == "mistralai/Mistral-Small-3.2-24B-Instruct-2506":
2027
  baseURL = os.environ['BASEURL_ALBERT_API_KEY']
2028
  os.environ['ENDPOINT_API_KEY'] = os.environ['ENDPOINT_ALBERT_API_KEY']
2029
  else: