Closed RRighart closed 1 year ago
@RRighart interesting. Do you have a link to a public Kaggle notebook? It would be great to have it work there.
Hi Douglas, here is the link: https://www.kaggle.com/code/rrighart/kangas-visualization-of-image-data-in-dataframes/notebook . Please let me know if it works. Best Regards, Ruthger
@RRighart Thanks for that! It is a helpful starting point.
Working in each of these environments has taken a little bit of work. So far, we have solutions for Jupyter, Colab, and HuggingFace Spaces. We'll have to dig into this a bit, but it seems possible.
I'll use this issue tracker to post hints (for anyone wanting to help) and status reports.
Here is a hint getting streamlit working in a Kaggle notebook (some similar issues as Kangas, eg, dealing with ports and server):
https://www.kaggle.com/code/ahmedshahriarsakib/streamlit-app-on-kaggle-notebook
Some progress! It is possible. Currently working with ngrok. Hopefully can smooth this out, and package it up:
Figured it out! Now, I'll package it up and make it easy and standard, like the other integrations (eg, you won't have to do all that follows).
Here is the manual instructions. Need to have an ngrok auth token: https://dashboard.ngrok.com/get-started/setup
%pip install kangas
%pip install pyngrok
# Start up ngrok, redirecting a public URL to port 4000:
from pyngrok import ngrok
ngrok.set_auth_token(NGROK_AUTH_TOKEN)
tunnel = ngrok.connect(4000, "http")
# A Kangas example
import kangas as kg
dg = kg.read_sklearn("iris")
dg.save()
kg.launch() # will replace with dg.show()
# This will be hidden in dg.show()
from IPython.display import IFrame
IFrame(tunnel.public_url + "?datagrid=iris.datagrid", width="100%", height="600")
Kangas version 2.3.4 now has support for Kaggle (just need to pip install pyngrok too).
Hi Douglas, thank you for your explanations. I have implemented your suggestions and made the changes in the Kaggle notebook ( https://www.kaggle.com/code/rrighart/kangas-visualization-of-image-data-in-dataframes ). In Kaggle console of the notebook, I set in the os environment the ngrok authorization key. Running once, the Iris data returns the Kangas Frame. After that, rerunning all, I do get a tunnel error. This is also the case for the image data where I cannot get the Kangas frame with images. Any suggestions would be very much appreciated!
It is now built into Kangas. This works for me: https://www.kaggle.com/dsblank/kangas-in-kaggle/edit
Even pyngrok is included, so just run normally (will as for ngrok auth token, and you have to press an extra button to continue).
We'll continue to look at this to see if there is an easier way forward.
I am working with Kangas locally and there everything works fine! Exploring Kangas on Kaggle in a notebook, I had some issues. When creating the dg table, I get the same column with images, with each image having this format <Image, asset_id='ae968db163e54bddb007609acd50c718'> . So this looks fine. But when using dg.show() to start an user interface, I only get a blank screen. I verified that the column that refers to image files only contains .jpg images. Should this work or is it not possible to view these images in Kangas on a webbased platform like Kaggle? Thank you very much in advance for your help! Ruthger Righart