ddangelov / restful-top2vec Goto Github PK
View Code? Open in Web Editor NEWExpose a Top2Vec model with a REST API.
License: BSD 3-Clause "New" or "Revised" License
Expose a Top2Vec model with a REST API.
License: BSD 3-Clause "New" or "Revised" License
Calling /topc/sizes
with my model gives exception:
72.17.0.1:40920 - "GET /openapi.json HTTP/1.1" 200
172.17.0.1:40922 - "GET /docs HTTP/1.1" 200
172.17.0.1:40922 - "GET /openapi.json HTTP/1.1" 200
172.17.0.1:40924 - "GET /topics/sizes HTTP/1.1" 500
[2021-06-10 10:13:27 +0000] [29] [ERROR] Exception in ASGI application
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/uvicorn/protocols/http/httptools_impl.py", line 390, in run_asgi
result = await app(self.scope, self.receive, self.send)
File "/usr/local/lib/python3.7/site-packages/uvicorn/middleware/proxy_headers.py", line 45, in __call__
return await self.app(scope, receive, send)
File "/usr/local/lib/python3.7/site-packages/fastapi/applications.py", line 149, in __call__
await super().__call__(scope, receive, send)
File "/usr/local/lib/python3.7/site-packages/starlette/applications.py", line 102, in __call__
await self.middleware_stack(scope, receive, send)
File "/usr/local/lib/python3.7/site-packages/starlette/middleware/errors.py", line 181, in __call__
raise exc from None
File "/usr/local/lib/python3.7/site-packages/starlette/middleware/errors.py", line 159, in __call__
await self.app(scope, receive, _send)
File "/usr/local/lib/python3.7/site-packages/starlette/exceptions.py", line 82, in __call__
raise exc from None
File "/usr/local/lib/python3.7/site-packages/starlette/exceptions.py", line 71, in __call__
await self.app(scope, receive, sender)
File "/usr/local/lib/python3.7/site-packages/starlette/routing.py", line 550, in __call__
await route.handle(scope, receive, send)
File "/usr/local/lib/python3.7/site-packages/starlette/routing.py", line 227, in handle
await self.app(scope, receive, send)
File "/usr/local/lib/python3.7/site-packages/starlette/routing.py", line 41, in app
response = await func(request)
File "/usr/local/lib/python3.7/site-packages/fastapi/routing.py", line 148, in app
dependant=dependant, values=values, is_coroutine=is_coroutine
File "/usr/local/lib/python3.7/site-packages/fastapi/routing.py", line 101, in run_endpoint_function
return await dependant.call(**values)
File "/app/main.py", line 107, in get_topic_sizes
topic_sizes, topic_nums = top2vec.get_topic_sizes()
File "/usr/local/lib/python3.7/site-packages/top2vec/Top2Vec.py", line 384, in get_topic_sizes
return np.array(self.topic_sizes.values), np.array(self.topic_sizes.index)
File "/usr/local/lib/python3.7/site-packages/pandas/core/generic.py", line 5272, in __getattr__
if self._info_axis._can_hold_identifiers_and_holds_name(name):
File "/usr/local/lib/python3.7/site-packages/pandas/core/generic.py", line 5272, in __getattr__
if self._info_axis._can_hold_identifiers_and_holds_name(name):
File "/usr/local/lib/python3.7/site-packages/pandas/core/generic.py", line 5272, in __getattr__
if self._info_axis._can_hold_identifiers_and_holds_name(name):
[Previous line repeated 480 more times]
File "/usr/local/lib/python3.7/site-packages/pandas/core/generic.py", line 493, in _info_axis
return getattr(self, self._info_axis_name)
File "/usr/local/lib/python3.7/site-packages/pandas/core/generic.py", line 5270, in __getattr__
return object.__getattribute__(self, name)
File "pandas/_libs/properties.pyx", line 63, in pandas._libs.properties.AxisProperty.__get__
File "/usr/local/lib/python3.7/site-packages/pandas/core/generic.py", line 5270, in __getattr__
return object.__getattribute__(self, name)
RecursionError: maximum recursion depth exceeded while calling a Python object
There are several methods that permit searching by VECTOR; but I don't see a way to retrieve meaningful vectors. For instance, if I submit a set of search words, top2vec creates the 'average' vector of these words. But I cannot retrieve this vector. Similarly with documents and groups of documents. Being able to retrieve these vectors would allow for use of these powerful methods in the API, as well as to explore the embedding space.
I start a docker container to see the results of algorithm, but can not attach it, and the container stop itself later.
The version used in this project is 1.08. But version https://pypi.org/project/top2vec/ has already 1.0.23. My suggestion: update all dependent requirements
Is the underlying data for the word clouds available in the REST API ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.