Complete Migration
This commit is contained in:
16
main.py
16
main.py
@@ -1,4 +1,5 @@
|
||||
from agent.agent import TweetOptimizerAgent, TweetOptimizerConfig
|
||||
from agent.index import TweetOptimizerAgent, TweetOptimizerConfig
|
||||
|
||||
|
||||
def main():
|
||||
# create agent with default config
|
||||
@@ -16,7 +17,7 @@ def main():
|
||||
results = tweet_optimizer(
|
||||
input_text="Anthropic added a new OSS model on HuggingFace.",
|
||||
iterations=10, # Reduced for testing
|
||||
patience=8
|
||||
patience=8,
|
||||
)
|
||||
print(f"Initial text: {results['initial_text']}")
|
||||
print(f"Final tweet: {results['final_tweet']}")
|
||||
@@ -31,19 +32,20 @@ def main():
|
||||
print("\n=== Push to Hub ===")
|
||||
try:
|
||||
tweet_optimizer.push_to_hub(
|
||||
"farouk1/tweet-optimizer-v2",
|
||||
commit_message="Complete Migration",
|
||||
with_code=True
|
||||
)
|
||||
"farouk1/tweet-optimizer-v2",
|
||||
commit_message="Complete Migration",
|
||||
with_code=True,
|
||||
)
|
||||
print("Successfully pushed to hub!")
|
||||
except Exception as e:
|
||||
print(f"Error pushing to hub: {e}")
|
||||
|
||||
|
||||
print("\n=== Agent Configuration ===")
|
||||
print(f"Model: {config.lm}")
|
||||
print(f"Categories: {config.categories}")
|
||||
print(f"Max iterations: {config.max_iterations}")
|
||||
print(f"Patience: {config.patience}")
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user