46573ccc8e
- Implement dibujar.py for drawing functionality with base64 and PIL image rendering. - Create dibujar_retropaint.py for retro painting features using the Paint widget. - Develop draw_data.py to visualize data with Scatter and Bar widgets, including lazy installation of dependencies. - Add layout configuration for graphical representations in layouts/Graficos_plotly.grid.json. - Enhance shell interaction with mejora_shell_mowidget.py, allowing local library imports and script execution. - Introduce primera_prueba_shell_mowidget.py for testing shell commands and user input handling. - Create prueba_de_embeddings.py for embedding visualizations using Sentence Transformers and dimensionality reduction techniques. - Implement pygwalker_visualizaciones.py for interactive data exploration and visualization using Pygwalker. - Add a sample bash script for user input and ping functionality in scripts/mi_script.sh.
49 lines
704 B
Python
49 lines
704 B
Python
import marimo
|
|
|
|
__generated_with = "0.15.2"
|
|
app = marimo.App(width="medium")
|
|
|
|
|
|
@app.cell
|
|
def _():
|
|
import marimo as mo
|
|
return (mo,)
|
|
|
|
|
|
@app.cell
|
|
def _():
|
|
from mopaint import Paint
|
|
from mohtml import img, div, tailwind_css
|
|
return Paint, div, img
|
|
|
|
|
|
@app.cell
|
|
def _(Paint, mo):
|
|
widget = mo.ui.anywidget(Paint(height=550))
|
|
widget
|
|
return (widget,)
|
|
|
|
|
|
@app.cell
|
|
def _(widget):
|
|
widget.value
|
|
return
|
|
|
|
|
|
@app.cell
|
|
def _(div, img, widget):
|
|
div(
|
|
img(src=widget.get_base64()), klass="bg-gray-200 p-4"
|
|
) # Use base64 representation directly with mohtml
|
|
return
|
|
|
|
|
|
@app.cell
|
|
def _(widget):
|
|
widget.get_pil()
|
|
return
|
|
|
|
|
|
if __name__ == "__main__":
|
|
app.run()
|