Solara

S

Solara

Join the community to ask questions about Solara and get answers from other members.

Join
Razzle
Razzle4/15/2024

Citing solara

Hello! This may be a bit of an odd request, but I'm interested in citing solara. Some popular python packages, such as networkx and mesa provide BibTex citations for the packages. Is anything like this available for solara?
Arkadii
Arkadii4/13/2024

Embedding Solara / iframe / parameter

I would like to integrate Solara to the exiting application using iframe with passing arguments.
<iframe src="http://localhost:8765/?data=test" width="100%" height="100%"></iframe> How can I read arguments in Solara application? ...
EdgeofChaos
EdgeofChaos4/13/2024

Full Screen Output

I am getting an error whenever I click on the full screen button and it also occurs in the documentation, as an example. with the error --- ''' The above exception was the direct cause of the following exception: ...
Cyrus
Cyrus4/12/2024

Setting height of `ipyaggrid` in Solara app gives error

Hi, how can I set the height of a ipyaggrid that is being cross-filtered by a solara component? I am using @MaartenBreddels 's snippet here https://discord.com/channels/1106593685241614489/1106593686223069309/1212429587867504730. However, if I pass an integer height to the grid element like this ipyaggrid.Grid.element(..., height=500) it renders fine but then leads to this error: trait of a Grid instance expected a unicode string, not the int 500, whenever the data is filtered. Could it be a bug in ipyaggrid where the widget expects height to be an int but the trait is defined as unicode, leading to data type issues? I found a workaround but wonder if I am missing something or if there is a better approach. Thanks! ``` from typing import cast import ipyaggrid...
alonsosilva
alonsosilva4/11/2024

Streaming partial extraction

I want to replicate this streaming partial extraction: https://x.com/jxnlco/status/1755723172228350056 The basic idea is to use an LLM to extract some particular information (for example, name, e-mail and twitter login) from a text. I think I'm able to do it inside the solara chatbot example. That is, I send a message (which will not be displayed) just to activate the extraction and then I will stream the response within the solara.lab.ChatBox. I don't like this solution because ideally I would like to activate the extraction with a button, not with solara.lab.ChatInput. Any hint about how to accomplish this?...
Johnowhitaker
Johnowhitaker4/9/2024

OAuth example fails

https://solara.dev/documentation/examples/general/login_oauth clicking the button results in an error page with Callback URL mismatch.
Lisa
Lisa4/9/2024

Switching Tabs resets a state when lazy loading is set to True

I want to keep local state of components when switching Tabs but also I need lazy=True since I don't want inactive tabs to be rendered. Unfortunately, it seems to be impossible to have both. With lazy=True the local state of the components resets to default values, in the attached example I used solara.use_state, but the same holds true for solara.use_reactive. Is there a way to keep local state of the component when switching Tabs and having lazy loading too?...
Razzle
Razzle4/3/2024

Running a file vs running a module

Hello! I am trying to get solara up and running for use with mesa but am having some issues. I structured my code as a python package and would like to be able to run solara run my-package (or even better, just my-package) in the cli to start the server. Currently, running solara run __main__.py works, but for some reason running solara run my-package does not. Adding a print statement to __main__.py, I can see it being printed but solara does not appear to be able to find the route:
Page not found by Solara router
Page not found by Solara router
...
Rob02
Rob023/26/2024

Multiple different solara apps under Fastapi endpoints?

Hi, I can follow the explanation from the docs to integrate one solara app into an existing FastAPI application https://solara.dev/docs/deploying/self-hosted ``` from fastapi import FastAPI...
artursp.
artursp.3/26/2024

Using existing plotly widget to update figures

With go.FigureWidget it is possible to update the data/properties of a figure without redrawing it. E.g. I can create a scatter plot with a lot of points: ``` N = 1000000 fig = go.FigureWidget(...
Jeff
Jeff3/21/2024

Multipage tab color

Is there a way to set the color of the page-tab text in a multipage application? I'm interested in setting the tab text color for both the selected and unselected states. I have tried various tests using style in the AppLayout component but had no luck.
DataVizLu
DataVizLu3/19/2024

Is there a way to filter the options in a select element

I want to use a select element but I have a rather big amount of options in my list, so I was wondering if it is possible to add a filter to the select element. I already tried the CrossFilterSelect element, but i need the style to be like the select element (without the element count percentage and "x of n").
Dave Hirschfeld
Dave Hirschfeld3/17/2024

Trying to understand state management

If I have a reusable component with an internal state value = use_reactive(42) linked to an IntSlider and I have multiple of these components on my page, how do I then get the values of all nested slider components to e.g. use in another component? e.g. ```python @solara.component...
Soulscode
Soulscode3/13/2024

Can't cancel running @task?

I've got a button triggered function that executes a for loop over a data set list and makes an API call for each. I added the @task decorator to keep it from holding up the UI, and a button triggered function to cancel the task(with a running check first). However, when I trigger the task(and I can see for sure that it's running from console logs), calling the task.cancel() didn't work. I threw in some log entries to check the task state, and they all indicate that the task isn't running(pending/is_current False, not_called True). Any ideas? I'll post the code shortly, I don't get discord on the work computer, so example code is a pain to bring over....
animusater
animusater3/11/2024

Possible to use custom vue components in `component_vue`?

In Voila, it was possible to register custom vue-only components by registering them with ipyvue, which made them available in the VuetifyTemplate use case. Is there an analog when using Solara? That is, can I register a custom vue component, and have it available in the vue file passed to component_vue? Registering it with ipyvue as before does not seem to work.
pikaa
pikaa3/10/2024

Plotly FigureWidget axes do not reset ranges within solara's render context

Upon applying an effect to set autorange=True to a figure with autorange='reversed', the Figure does not return to the original axes orientation. I'm wondering what happens behind the scenes here for the render when the use_effect is triggered. I can upload a ipynb with its expected behaviour within a jupyter context vs its behaviour in solara. The partial code (can give complete if needed). plotstate contains 2 reactives for flipx and flipy....
Townsaver
Townsaver3/9/2024

Interactive layout

There are a couple of defunt projects out there like jupyter-flex and jupyter-dashboard for creating user dashboards in Voila. Is there an easy to do create flexlayout interactive dashboards in Reacton/Solara?
Corran
Corran3/8/2024

Using vue libraries with ipyvuetify & solara

Is it naive to think vuepdf should work out of the box with a ipyvuetify template? I've stripped the code to its bare minimum, it should show a single pdf page from the url. My code isnt showing errors but it also isn't showing a pdf. vue_pdf.vue...
animusater
animusater3/7/2024

Interact with `Layout` defined in another file

In a file with a defined Page solara component, I can import a defined Layout specified in another file. Just importing is enough to render the page in that layout. However, it does not seem to allow for interacting with the layout; i.e. I cannot pass a "page title" or something similar. I'm curious if it's possible to interact with the Layout beyond being able to define the children, or if perhaps I should be inspecting the children and pulling out which elements I want for particulars parts of the layout? For example: ``` layout.py...
mangecoeur
mangecoeur3/6/2024

use_thread eats logs?

When an exception is thrown in a function run from use_thread it seems I don't get any log (logging using structlog), I see there is an error state in the use_thread is there a way to get logging from that?