Aktraiser commited on
Commit
cc5a0ed
·
1 Parent(s): a4d9764

probleme import

Browse files
Files changed (1) hide show
  1. app.py +44 -0
app.py CHANGED
@@ -18,6 +18,45 @@ from tools import *
18
  logging.basicConfig(level=logging.INFO)
19
  logger = logging.getLogger(__name__)
20
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  # === CONFIGURATION DE L'APPLICATION GRADIO ===
22
 
23
  def setup_demo():
@@ -281,6 +320,11 @@ def setup_demo():
281
  if __name__ == "__main__":
282
  demo = setup_demo()
283
 
 
 
 
 
 
284
  # Configuration pour Hugging Face Spaces avec MCP
285
  demo.launch(
286
  mcp_server=True, # 🔑 Active le serveur MCP !
 
18
  logging.basicConfig(level=logging.INFO)
19
  logger = logging.getLogger(__name__)
20
 
21
+ # === DÉCLARATION EXPLICITE DES OUTILS MCP POUR GRADIO ===
22
+
23
+ # Liste de toutes les fonctions MCP à exposer explicitement
24
+ MCP_TOOLS = [
25
+ # Configuration
26
+ configure_figma_token,
27
+ configure_figma_file_id,
28
+
29
+ # Navigation
30
+ get_figma_file_info,
31
+ get_figma_comments,
32
+ get_figma_user_info,
33
+
34
+ # Compte utilisateur
35
+ get_figma_user_detailed_info,
36
+ list_figma_user_teams,
37
+ get_figma_team_info,
38
+ get_figma_current_user_permissions,
39
+ get_figma_workspace_usage_stats,
40
+ get_figma_api_limitations_info,
41
+ list_figma_team_projects,
42
+
43
+ # Figma Design
44
+ create_figma_rectangle,
45
+ create_figma_frame,
46
+ create_figma_text,
47
+
48
+ # FigJam
49
+ create_figjam_sticky_note,
50
+ create_figjam_connector_between_elements,
51
+ create_figjam_shape_with_text,
52
+ create_figjam_table,
53
+ create_figjam_code_block,
54
+ create_figjam_background_shape,
55
+ create_figjam_sticker,
56
+ create_figjam_workshop_template,
57
+ create_figjam_organized_zone
58
+ ]
59
+
60
  # === CONFIGURATION DE L'APPLICATION GRADIO ===
61
 
62
  def setup_demo():
 
320
  if __name__ == "__main__":
321
  demo = setup_demo()
322
 
323
+ # S'assurer que tous les outils MCP sont disponibles dans l'espace de noms global
324
+ global_dict = globals()
325
+ for tool in MCP_TOOLS:
326
+ global_dict[tool.__name__] = tool
327
+
328
  # Configuration pour Hugging Face Spaces avec MCP
329
  demo.launch(
330
  mcp_server=True, # 🔑 Active le serveur MCP !