GOATS/Main.py

23 lines
762 B
Python
Raw Permalink Normal View History

from NaturalLanguageAnalyzer import NaturalLanguageAnalyzer
2024-04-21 10:09:03 +02:00
from DialoguePolicy import DialoguePolicy
from DialogueStateTracker import DialogueStateTracker
2024-06-07 00:38:21 +02:00
from NaturalLanguageGeneration import NaturalLanguageGeneration
from convlab.dialog_agent import PipelineAgent
2024-06-07 00:38:21 +02:00
import warnings
warnings.filterwarnings("ignore")
2024-06-04 21:53:50 +02:00
if __name__ == "__main__":
nlu = NaturalLanguageAnalyzer()
dst = DialogueStateTracker()
policy = DialoguePolicy()
2024-06-07 00:38:21 +02:00
nlg = NaturalLanguageGeneration()
2024-04-21 10:09:03 +02:00
agent = PipelineAgent(nlu=nlu, dst=dst, policy=policy, nlg=nlg, name='sys')
2024-06-07 00:38:21 +02:00
print("Witam, jestem systemem do rezerwowania pokoi hotelowych. W czym mogę Ci pomóc?")
while True:
text = input()
response = agent.response(text)
print(response)