Git Product home page Git Product logo

Comments (6)

theamrzaki avatar theamrzaki commented on July 29, 2024

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))

from eazymind.

theamrzaki avatar theamrzaki commented on July 29, 2024

hope this helps

from eazymind.

cyberandy avatar cyberandy commented on July 29, 2024

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>

from eazymind.

cyberandy avatar cyberandy commented on July 29, 2024

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.

from eazymind.

theamrzaki avatar theamrzaki commented on July 29, 2024

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

from eazymind.

cyberandy avatar cyberandy commented on July 29, 2024

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

from eazymind.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.