Compare commits
No commits in common. "71c2c2c3da271fcbbbb7e1931eaf16f7823b110c" and "93534897b49238752d755266f9ad852a19948d0f" have entirely different histories.
71c2c2c3da
...
93534897b4
|
|
@ -12,7 +12,7 @@ class DisplayFormatter:
|
|||
|
||||
sentiment = result["sentiment"]
|
||||
confidence = result["confidence"]
|
||||
emoji = "😊" if sentiment == "positive" else "😞"
|
||||
emoji = "😊" if sentiment == "POSITIVE" else "😞"
|
||||
|
||||
return f"{emoji} Sentiment: {sentiment}\n📊 Confidence: {confidence:.2%}"
|
||||
|
||||
|
|
|
|||
31
src/main.py
31
src/main.py
|
|
@ -6,16 +6,10 @@ import sys
|
|||
from pathlib import Path
|
||||
|
||||
# Add parent directory to PYTHONPATH
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
|
||||
sys.path.insert(0, str(Path(__file__).parent.parent))
|
||||
|
||||
from src.cli import InteractiveCLI
|
||||
from src.commands import (
|
||||
FillMaskCommand,
|
||||
ModerationCommand,
|
||||
NERCommand,
|
||||
SentimentCommand,
|
||||
TextGenCommand,
|
||||
)
|
||||
from src.commands import SentimentCommand, FillMaskCommand, TextGenCommand, ModerationCommand, NERCommand
|
||||
|
||||
|
||||
def main():
|
||||
|
|
@ -23,27 +17,22 @@ def main():
|
|||
try:
|
||||
# Create CLI interface
|
||||
cli = InteractiveCLI()
|
||||
|
||||
|
||||
# Register available commands
|
||||
commands_to_register = [
|
||||
SentimentCommand,
|
||||
FillMaskCommand,
|
||||
TextGenCommand,
|
||||
ModerationCommand,
|
||||
NERCommand,
|
||||
]
|
||||
for command in commands_to_register:
|
||||
cli.register_command(command())
|
||||
|
||||
cli.register_command(SentimentCommand())
|
||||
cli.register_command(FillMaskCommand())
|
||||
cli.register_command(TextGenCommand())
|
||||
cli.register_command(ModerationCommand())
|
||||
cli.register_command(NERCommand())
|
||||
|
||||
# Launch interactive interface
|
||||
cli.run()
|
||||
|
||||
|
||||
except KeyboardInterrupt:
|
||||
print("\n👋 Stopping program")
|
||||
except Exception as e:
|
||||
print(f"❌ Error: {e}")
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
|
|||
Loading…
Reference in New Issue