openai / gpt-2-output-dataset

Dataset of GPT-2 outputs for research in detection, biases, and more
MIT License
1.93k stars 548 forks source link

SyntaxError: invalid syntax detector server #20

Closed basu-a closed 4 years ago

basu-a commented 4 years ago

Getting into syntax error when running the detector. Is there something that I should be configuring with Detector before running it?

  File "C:\Users\user\AppData\Local\Programs\Python\Python35\lib\runpy.py", line 151, in _run_module_as_main
    mod_name, mod_spec, code = _get_module_details(mod_name)
  File "C:\Users\user)\AppData\Local\Programs\Python\Python35\lib\runpy.py", line 126, in _get_module_details
    code = loader.get_code(mod_name)
  File "<frozen importlib._bootstrap_external>", line 764, in get_code
  File "<frozen importlib._bootstrap_external>", line 724, in source_to_code
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "C:\Docks\git\notebooks\GPT 2\gpt-2-output-dataset-master\detector\server.py", line 13
    model: RobertaForSequenceClassification = None
         ^
SyntaxError: invalid `syntax`
jongwook commented 4 years ago

The code uses PEP-526 which is supported in Python 3.6+.

You can either remove the type annotation or upgrade to either Python 3.6 or 3.7.