deepklarity / jupyter-text2code Goto Github PK
View Code? Open in Web Editor NEWA proof-of-concept jupyter extension which converts english queries into relevant python code
License: MIT License
A proof-of-concept jupyter extension which converts english queries into relevant python code
License: MIT License
The installation worked correctly. The Terminal Icon is not visible a shown in the demo. Is there a way to activate it?
Thanks
HI,
I really find the concept interesting however after installing I get the following error:
[W 19:07:57.734 NotebookApp] Error loading server extension jupyter_text2code.jupyter_text2code_serverextension
Traceback (most recent call last):
File "/Users/hicham/.local/lib/python3.7/site-packages/notebook/notebookapp.py", line 1942, in init_server_extensions
mod = importlib.import_module(modulename)
File "/opt/anaconda3/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/opt/anaconda3/lib/python3.7/site-packages/jupyter_text2code/jupyter_text2code_serverextension/init.py", line 5, in
import faiss
File "/opt/anaconda3/lib/python3.7/site-packages/faiss/init.py", line 19, in
from .swigfaiss import *
File "/opt/anaconda3/lib/python3.7/site-packages/faiss/swigfaiss.py", line 649, in
class HammingComputer4(_object):
File "/opt/anaconda3/lib/python3.7/site-packages/faiss/swigfaiss.py", line 655, in HammingComputer4
swig_setmethods["a0"] = _swigfaiss.HammingComputer4_a0_set
AttributeError: module 'faiss._swigfaiss' has no attribute 'HammingComputer4_a0_set'
Resulting in this error when trying to use the terminal on a notebook:
[W 19:08:00.061 NotebookApp] 404 GET /nbextensions/jupyter-text2code/icon.jpg (::1) 7.30ms referer=http://localhost:8888/tree
[W 19:08:21.215 NotebookApp] 404 GET /jupyter-text2code?query=help&dataframes_info=%27%7B%7D%27 (::1) 2.78ms referer=http://localhost:8888/notebooks/Untitled6.ipynb
Thanks for your help !
I can't find path of nbextension specified in github repository..
@deepak-deepklarity @dk-crazydiv please help!
ERROR: No matching distribution found for faiss (from jupyter-text2code==0.0.2)
Does the package actually require a GPU in order to run the extension? I can imagine the GPU is needed for the training runs, but the resource requirements should be less to just run the extension?
If the extension will run without a GPU, it would be useful to have a MyBinder demo so folk can try it out without any installation requirements.
Installed the extension in Google colab with the below code.
import os
MYDIR = ("jupyter-text2code-master")
CHECK_FOLDER = os.path.isdir(MYDIR)
if not CHECK_FOLDER:
!apt install unzip
!wget -q https://github.com/deepklarity/jupyter-text2code/archive/master.zip
!unzip -q master.zip
!pip install /content/jupyter-text2code-master
!apt-get install libomp-dev
!apt-get install libomp-doc
!pwd
But when try to import the extension, get the below error
import sys
sys.path.insert(0,'../')
from mopp.mopp_serverextension import CodeGenerator
FileNotFoundError: [Errno 2] No such file or directory: '/usr/local/lib/python3.6/dist-packages/mopp/mopp_serverextension/models/ner/vocab/lexemes.bin'
I've installed the library and it downloaded the model from tensorflow_hub, but it's not showing any pop-up there. Is it mandatory to run the codes mentioned in the documentation in github?
I've runned the generate and create intent code and i didn't understand the modify part mentioned.
The library is installed and nothing extra button is there to enter the input
Hi,
I'm getting the below error. please help
ERROR: Could not find a version that satisfies the requirement faiss (from mopp==0.0.1) (from versions: none)
ERROR: No matching distribution found for faiss (from mopp==0.0.1)
I've tried my level best to install this library and it installed but there is no snippet showing to enter the input. Can anyone or author of this library create a video on how to install this library from scratch?
[W 14:18:03.862 NotebookApp] Error loading server extension mopp.mopp_serverextension
Traceback (most recent call last):
File "/Users/varun/venv/ml/lib/python3.7/site-packages/notebook/notebookapp.py", line 1942, in init_server_extensions
mod = importlib.import_module(modulename)
File "/Users/varun/venv/ml/lib/python3.7/importlib/init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1006, in _gcd_import
File "", line 983, in _find_and_load
File "", line 967, in _find_and_load_unlocked
File "", line 677, in _load_unlocked
File "", line 728, in exec_module
File "", line 219, in _call_with_frames_removed
File "/Users/varun/venv/ml/lib/python3.7/site-packages/mopp/mopp_serverextension/init.py", line 487, in
CG = CodeGenerator()
File "/Users/varun/venv/ml/lib/python3.7/site-packages/mopp/mopp_serverextension/init.py", line 48, in init
self.nlp = spacy.load(SPACY_MODEL_DIR)
File "/Users/varun/venv/ml/lib/python3.7/site-packages/spacy/init.py", line 30, in load
return util.load_model(name, **overrides)
File "/Users/varun/venv/ml/lib/python3.7/site-packages/spacy/util.py", line 166, in load_model
return load_model_from_path(Path(name), **overrides)
File "/Users/varun/venv/ml/lib/python3.7/site-packages/spacy/util.py", line 211, in load_model_from_path
return nlp.from_disk(model_path, exclude=disable)
File "/Users/varun/venv/ml/lib/python3.7/site-packages/spacy/language.py", line 947, in from_disk
util.from_disk(path, deserializers, exclude)
File "/Users/varun/venv/ml/lib/python3.7/site-packages/spacy/util.py", line 654, in from_disk
reader(path / key)
File "/Users/varun/venv/ml/lib/python3.7/site-packages/spacy/language.py", line 931, in
p
File "vocab.pyx", line 466, in spacy.vocab.Vocab.from_disk
File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pathlib.py", line 1203, in open
opener=self._opener)
File "/usr/local/Cellar/python/3.7.6_1/Frameworks/Python.framework/Versions/3.7/lib/python3.7/pathlib.py", line 1058, in _opener
return self._accessor.open(self, flags, mode)
FileNotFoundError: [Errno 2] No such file or directory: '/Users/varun/venv/ml/lib/python3.7/site-packages/mopp/mopp_serverextension/models/ner/vocab/lexemes.bin'
Hi,
When playing around with the demo notebook, I received the above error after executing the following cell:
cg.generate_code("import spacy")
What do you think is the solution?
Operating system: MacOS
Python version: 3.7
Tensorflow version: 1.15.2
I am facing an issue with window installation on Jupyter notebook using anaconda.
Error:
ERROR: Could not find a version that satisfies the requirement faiss (from jupyter-text2code==0.0.2) (from versions: none)
ERROR: No matching distribution found for faiss (from jupyter-text2code==0.0.2)
Add Speech2Text support so there's minimal typing required. We initially had done an implementation using Mozilla's DeepSpeech pre-trained model but it didn't work well for different types of accents.
We are thinking of using Chrome's built in Web Speech API and Firefox Voice addon and populate our query box with the text response. User can edit/fix the text and submit the query to get code. Another option which isn't explored yet, is to finetune DeepSpeech on a custom dataset, more suited for understanding dataframe, variable & column names.
Any contributions are welcome.
Following solutions can be explored:
(virtenv)\>jupyter-text2code>pip install .
Processing \jupyter-text2code
Requirement already satisfied: jupyter in c:\programdata\anaconda3\envs\virtenv\lib\site-packages (from mopp==0.0.1) (1.0.0)
Requirement already satisfied: jupyter_nbextensions_configurator in c:\programdata\anaconda3\envs\virtenv\lib\site-packages (from mopp==0.0.1) (0.4.1)
ERROR: Could not find a version that satisfies the requirement faiss (from mopp==0.0.1) (from versions: none)
ERROR: No matching distribution found for faiss (from mopp==0.0.1)
Perhaps an alternative to faiss could be introduced for cosine similarity
I followed the tutorial installing everything required, under Ubuntu 20.04 in a VirtualBox VM. Everything works fine until i get to this command
pip install .
jupyter nbextension enable jupyter-text2code/main
I get different errors like: jupyter-nbextension is not found or could not find a version that satisfies the requirments faiss (for jupyter-text2code==0.0.2) and others
How can i proceed further?
Is this supported on Google Colab?
TQ.
Refactor code and make it more modular, remove duplicate code, etc. For example, the code for error handling can be moved to a separate function and made modular.
C:\Users\admin>pip install .
ERROR: Directory '.' is not installable. Neither 'setup.py' nor 'pyproject.toml' found.
Have tried different ways of installing this all fail. Followed isntructions.
As far as I understood, this seems like GitHub Copilot for Jupyter, so why not use the official codex API to convert from english to code?
P.S: I may be wrong in understanding the project, in which case this issue doesn't make much sense :)
Failed to install. Can you clarify the installation instructions please.
@deepak-deepklarity how to contribute to this project?
I am installing on macOS Mojave CPU only. I have followed the cpu only instructions from the README. However, the terminal icon does not show up in jupyter. How do i fix this?
Hitting Mopp it in the Jupyter extension throws 404 errors.
404 GET /mopp?query=import%20all%20libraries&dataframes_info=%27%7B%7D%27 (127.0.0.1)
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.