SkyNait commited on
Commit
25c35b4
·
1 Parent(s): 6fc2b3e
__pycache__/topic_extr.cpython-310.pyc CHANGED
Binary files a/__pycache__/topic_extr.cpython-310.pyc and b/__pycache__/topic_extr.cpython-310.pyc differ
 
test_listener.py CHANGED
@@ -53,30 +53,28 @@ def listen_for_results():
53
 
54
  if __name__ == "__main__":
55
  payload = {
56
- "pattern": "topic_extraction",
57
- "data": {
58
- "input_files": [
59
- {
60
- "key": "file1",
61
- "url": "https://www.ocr.org.uk/Images/168982-specification-gcse-mathematics.pdf",
62
- "type": "specification"
63
- }
64
- ],
65
- "topics": [
66
- {
67
- "title": "Sample Topic",
68
- "id": 1
69
- }
70
- ]
71
- }
 
72
  }
73
 
74
- # Start the producer (ml_server sending the request) in a separate thread.
75
  producer_thread = threading.Thread(target=send_topic_extraction_request, args=(payload,))
76
  producer_thread.start()
77
 
78
- # Give a short delay to allow the message to reach the worker.
79
  time.sleep(1)
80
 
81
- # Start listening for results on the ml_server queue.
82
  listen_for_results()
 
53
 
54
  if __name__ == "__main__":
55
  payload = {
56
+ "pattern": "topic_extraction",
57
+ "data": {
58
+ "input_files": [
59
+ {
60
+ "key": "",
61
+ "url": "https://qualifications.pearson.com/content/dam/pdf/A%20Level/Mathematics/2017/specification-and-sample-assesment/a-level-l3-mathematics-specification-issue4.pdf",
62
+ "type": "specification",
63
+ "page": [15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 34, 35, 36, 37, 38, 39, 40, 41, 42]
64
+ }
65
+ ],
66
+ "topics": [
67
+ {
68
+ "title": "",
69
+ "id": 123
70
+ }
71
+ ]
72
+ }
73
  }
74
 
 
75
  producer_thread = threading.Thread(target=send_topic_extraction_request, args=(payload,))
76
  producer_thread.start()
77
 
 
78
  time.sleep(1)
79
 
 
80
  listen_for_results()