diff --git a/cryptoai/tasks/token_selector.py b/cryptoai/tasks/token_selector.py index 344c6b0..f035364 100644 --- a/cryptoai/tasks/token_selector.py +++ b/cryptoai/tasks/token_selector.py @@ -88,7 +88,7 @@ def analyze_symbol(symbol, interval='1h', limit=1000): '得分': 0 } -if __name__ == "__main__": +def main(): # 执行分析 results = [analyze_symbol(sym) for sym in top_symbols] df_result = pd.DataFrame(results) @@ -169,4 +169,7 @@ if __name__ == "__main__": border_style="blue" ) console.print("\n") - console.print(info_panel) \ No newline at end of file + console.print(info_panel) + +if __name__ == "__main__": + main() \ No newline at end of file diff --git a/test.py b/test.py index 1379706..72cca2c 100644 --- a/test.py +++ b/test.py @@ -1,5 +1,5 @@ from cryptoai.agents.crypto_agent import CryptoAgent +import cryptoai.tasks.token_selector as token_selector if __name__ == "__main__": - agent = CryptoAgent() - agent.start_agent() \ No newline at end of file + token_selector.main() \ No newline at end of file