Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ModuleNotFoundError: No module named 'nlp' #1

Open
cyberandy opened this issue Jun 15, 2019 · 6 comments
Open

ModuleNotFoundError: No module named 'nlp' #1

cyberandy opened this issue Jun 15, 2019 · 6 comments

Comments

@cyberandy
Copy link

Installation is successful but when running the script the module cannot be found (from nlp.eazysum import Summarizer).

I am trying to use eazymind in /anaconda3/lib/python3.7/site-packages (0.0.3)

@theamrzaki
Copy link
Owner

theamrzaki commented Jun 15, 2019

try calling it this way

from eazymind.nlp.eazysum import Summarizer

#---key from eazymind website---
key = "xxxxxxxxxxxxxxxxxxxxx"

#---sentence to be summarized---
sentence = """(CNN)The White House has instructed former
    White House Counsel Don McGahn not to comply with a subpoena
    for documents from House Judiciary Chairman Jerry Nadler, 
    teeing up the latest in a series of escalating oversight 
    showdowns between the Trump administration and congressional Democrats."""
    
summarizer = Summarizer(key)
print(summarizer.run(sentence))

@theamrzaki
Copy link
Owner

hope this helps

@cyberandy
Copy link
Author

Nope, it didn't work 😞is there a way to test it directly on Colaboratory? Here is the error I am receving.

  File "sum-test.py", line 1, in <module>
    from nlp.eazysum import Summarizer
ModuleNotFoundError: No module named 'nlp'
(base) Andreas-Air:Downloads cyberandy$ python sum-test.py
<!DOCTYPE html>
	<html>
	  <head>
		<meta name="viewport" content="width=device-width, initial-scale=1">
		<meta charset="utf-8">
		<title>Application Error</title>
		<style media="screen">
		  html,body,iframe {
			margin: 0;
			padding: 0;
		  }
		  html,body {
			height: 100%;
			overflow: hidden;
		  }
		  iframe {
			width: 100%;
			height: 100%;
			border: 0;
		  }
		</style>
	  </head>
	  <body>
		<iframe src="//www.herokucdn.com/error-pages/application-error.html"></iframe>
	  </body>
	</html>

@cyberandy
Copy link
Author

It does work if I reduce the length of the input string (or the number of paragraphs). I have 2199 characters in my sentence and this throws an error.

but I would need some control on the output tokens.

@theamrzaki
Copy link
Owner

replace
from nlp.eazysum import Summarizer
to
from eazymind.nlp.eazysum import Summarizer
and tell me if it works or not please

@cyberandy
Copy link
Author

I did and it works if the input sentence is not too long.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants