Spaces:
Sleeping
Sleeping
Readme Fixes
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ import datetime
|
|
9 |
|
10 |
import gradio as gr
|
11 |
|
12 |
-
#
|
13 |
try:
|
14 |
from smolagents import CodeAgent, HfApiModel
|
15 |
SMOLAGENTS_AVAILABLE = True
|
@@ -22,7 +22,7 @@ from huggingface_hub import InferenceClient
|
|
22 |
|
23 |
# --- Demo UI Component Functions ---
|
24 |
|
25 |
-
# App Introduction Function
|
26 |
|
27 |
|
28 |
def demo_vid():
|
@@ -172,7 +172,8 @@ def app_intro():
|
|
172 |
""")
|
173 |
gr.Markdown(part3)
|
174 |
|
175 |
-
|
|
|
176 |
|
177 |
|
178 |
def create_smart_contract_analyzer(hf_token, model_name):
|
@@ -531,7 +532,7 @@ def analyze_smart_contract(contract_code: str, hf_token: str = "", hf_model: str
|
|
531 |
*Xyizko Smart Contract Analyzer - MCP Tool*
|
532 |
"""
|
533 |
|
534 |
-
# --- Smart Contract Analysis Tab
|
535 |
|
536 |
|
537 |
def upload_tab():
|
@@ -872,7 +873,7 @@ if __name__ == "__main__":
|
|
872 |
print("💡 Deploy to HuggingFace Spaces for public MCP access!")
|
873 |
|
874 |
demo.launch(
|
875 |
-
mcp_server=True,
|
876 |
share=False,
|
877 |
server_name="0.0.0.0",
|
878 |
show_error=True
|
|
|
9 |
|
10 |
import gradio as gr
|
11 |
|
12 |
+
# Importing Smolagents with error handling
|
13 |
try:
|
14 |
from smolagents import CodeAgent, HfApiModel
|
15 |
SMOLAGENTS_AVAILABLE = True
|
|
|
22 |
|
23 |
# --- Demo UI Component Functions ---
|
24 |
|
25 |
+
# App Introduction Function
|
26 |
|
27 |
|
28 |
def demo_vid():
|
|
|
172 |
""")
|
173 |
gr.Markdown(part3)
|
174 |
|
175 |
+
|
176 |
+
# --- Smart Contract Agent ---
|
177 |
|
178 |
|
179 |
def create_smart_contract_analyzer(hf_token, model_name):
|
|
|
532 |
*Xyizko Smart Contract Analyzer - MCP Tool*
|
533 |
"""
|
534 |
|
535 |
+
# --- Smart Contract Analysis Tab ---
|
536 |
|
537 |
|
538 |
def upload_tab():
|
|
|
873 |
print("💡 Deploy to HuggingFace Spaces for public MCP access!")
|
874 |
|
875 |
demo.launch(
|
876 |
+
mcp_server=True,
|
877 |
share=False,
|
878 |
server_name="0.0.0.0",
|
879 |
show_error=True
|