Antoine Chaffin commited on
Commit
50e8787
·
1 Parent(s): 9579ef1

Download index before creating MCP object

Browse files
Files changed (1) hide show
  1. app.py +5 -6
app.py CHANGED
@@ -9,6 +9,11 @@ MCPyLate Server
9
  A Model Context Protocol server that provides search functionality using PyLate.
10
  """
11
 
 
 
 
 
 
12
  mcpylate = MCPyLate()
13
 
14
 
@@ -27,12 +32,6 @@ def pylate_search_leetcode(
27
  return mcpylate.search(query, k)
28
 
29
 
30
- snapshot_download(
31
- repo_id="lightonai/leetcode_reasonmoderncolbert",
32
- local_dir="indexes/",
33
- repo_type="dataset",
34
- )
35
-
36
  demo = gr.Interface(
37
  fn=pylate_search_leetcode,
38
  inputs=["text"],
 
9
  A Model Context Protocol server that provides search functionality using PyLate.
10
  """
11
 
12
+ snapshot_download(
13
+ repo_id="lightonai/leetcode_reasonmoderncolbert",
14
+ local_dir="indexes/",
15
+ repo_type="dataset",
16
+ )
17
  mcpylate = MCPyLate()
18
 
19
 
 
32
  return mcpylate.search(query, k)
33
 
34
 
 
 
 
 
 
 
35
  demo = gr.Interface(
36
  fn=pylate_search_leetcode,
37
  inputs=["text"],