Update app.py
Browse files
app.py
CHANGED
|
@@ -430,10 +430,10 @@ function selectJob(jobId, el) {
|
|
| 430 |
|
| 431 |
inputs = [query_input, threshold_slider]
|
| 432 |
outputs = [results_html, detail_html, mode_banner]
|
| 433 |
-
search_btn.click(fn=_search, inputs=inputs, outputs=outputs)
|
| 434 |
-
query_input.submit(fn=_search, inputs=inputs, outputs=outputs)
|
| 435 |
-
threshold_slider.release(fn=_search, inputs=inputs, outputs=outputs)
|
| 436 |
-
demo.load(fn=_search, inputs=inputs, outputs=outputs)
|
| 437 |
|
| 438 |
def search_avps(query: str, threshold: float = 50) -> str:
|
| 439 |
pass
|
|
@@ -524,10 +524,13 @@ def search_avps(query: str, threshold: float = 50) -> str:
|
|
| 524 |
mcp_interface = gr.Interface(
|
| 525 |
fn=search_avps,
|
| 526 |
inputs=[
|
| 527 |
-
gr.Textbox(label="Profil ou mots-clés"
|
|
|
|
| 528 |
gr.Slider(minimum=0, maximum=100, value=50, step=5, label="Score minimum (%)"),
|
| 529 |
],
|
| 530 |
outputs=gr.Textbox(label="Résultats JSON"),
|
|
|
|
|
|
|
| 531 |
api_name="search_avps",
|
| 532 |
flagging_mode="never",
|
| 533 |
)
|
|
@@ -539,4 +542,4 @@ app = gr.TabbedInterface(
|
|
| 539 |
)
|
| 540 |
|
| 541 |
if __name__ == "__main__":
|
| 542 |
-
app.launch(mcp_server=True)
|
|
|
|
| 430 |
|
| 431 |
inputs = [query_input, threshold_slider]
|
| 432 |
outputs = [results_html, detail_html, mode_banner]
|
| 433 |
+
search_btn.click(fn=_search, inputs=inputs, outputs=outputs, api_name=False)
|
| 434 |
+
query_input.submit(fn=_search, inputs=inputs, outputs=outputs, api_name=False)
|
| 435 |
+
threshold_slider.release(fn=_search, inputs=inputs, outputs=outputs, api_name=False)
|
| 436 |
+
demo.load(fn=_search, inputs=inputs, outputs=outputs, api_name=False)
|
| 437 |
|
| 438 |
def search_avps(query: str, threshold: float = 50) -> str:
|
| 439 |
pass
|
|
|
|
| 524 |
mcp_interface = gr.Interface(
|
| 525 |
fn=search_avps,
|
| 526 |
inputs=[
|
| 527 |
+
gr.Textbox(label="Profil ou mots-clés",
|
| 528 |
+
placeholder="Ex: expert gestion de projet SI, ingénieur réseau télécoms, cadre RH..."),
|
| 529 |
gr.Slider(minimum=0, maximum=100, value=50, step=5, label="Score minimum (%)"),
|
| 530 |
],
|
| 531 |
outputs=gr.Textbox(label="Résultats JSON"),
|
| 532 |
+
title="AVPs OPT-NC — Recherche sémantique",
|
| 533 |
+
description=search_avps.__doc__,
|
| 534 |
api_name="search_avps",
|
| 535 |
flagging_mode="never",
|
| 536 |
)
|
|
|
|
| 542 |
)
|
| 543 |
|
| 544 |
if __name__ == "__main__":
|
| 545 |
+
app.launch(mcp_server=True)
|