Compare commits
3 Commits
93534897b4
...
71c2c2c3da
| Author | SHA1 | Date |
|---|---|---|
|
|
71c2c2c3da | |
|
|
b990f80263 | |
|
|
4394db1810 |
|
|
@ -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%}"
|
||||
|
||||
|
|
|
|||
25
src/main.py
25
src/main.py
|
|
@ -6,10 +6,16 @@ import sys
|
|||
from pathlib import Path
|
||||
|
||||
# Add parent directory to PYTHONPATH
|
||||
sys.path.insert(0, str(Path(__file__).parent.parent))
|
||||
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
|
||||
|
||||
from src.cli import InteractiveCLI
|
||||
from src.commands import SentimentCommand, FillMaskCommand, TextGenCommand, ModerationCommand, NERCommand
|
||||
from src.commands import (
|
||||
FillMaskCommand,
|
||||
ModerationCommand,
|
||||
NERCommand,
|
||||
SentimentCommand,
|
||||
TextGenCommand,
|
||||
)
|
||||
|
||||
|
||||
def main():
|
||||
|
|
@ -19,11 +25,15 @@ def main():
|
|||
cli = InteractiveCLI()
|
||||
|
||||
# Register available commands
|
||||
cli.register_command(SentimentCommand())
|
||||
cli.register_command(FillMaskCommand())
|
||||
cli.register_command(TextGenCommand())
|
||||
cli.register_command(ModerationCommand())
|
||||
cli.register_command(NERCommand())
|
||||
commands_to_register = [
|
||||
SentimentCommand,
|
||||
FillMaskCommand,
|
||||
TextGenCommand,
|
||||
ModerationCommand,
|
||||
NERCommand,
|
||||
]
|
||||
for command in commands_to_register:
|
||||
cli.register_command(command())
|
||||
|
||||
# Launch interactive interface
|
||||
cli.run()
|
||||
|
|
@ -34,5 +44,6 @@ def main():
|
|||
print(f"❌ Error: {e}")
|
||||
sys.exit(1)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
|
|||
Loading…
Reference in New Issue