hydralit을 사용하는 도중 불편한 것이 발견되어 오래 사투하게 되었다.

streamlit으로 spinner를 사용하면 불필요한 hydralit의 loader 3개씩이나 뜬다는 것이다!

관련 구글링을 아무리 해봐도 찾지 못해 답답했다.

우연히 함수들을 찾아보다가 발견해버렸다!

 

수정해야할 코드 위치

/opt/conda/lib/python3.8/site-packages/hydralit/loading_app.py

import streamlit as st
from hydralit_components import HyLoader, Loaders
from hydralit.app_template import HydraHeadApp

class LoadingApp(HydraHeadApp):

def run(self,app_target):

    try:
        app_title = ''
        if hasattr(app_target,'title'):
            app_title = app_target.title

        # with HyLoader("Now loading {}".format(app_title), loader_name=Loaders.standard_loaders,index=[3,0,5]):
        app_target.run()
  
    except Exception as e:
        raise e

 

 

[StackOverFlow에 답글 달아주기]

https://stackoverflow.com/questions/71652864/how-to-remove-the-animated-loader-from-hydralit-streamlit

 

How to remove the animated loader from hydralit (streamlit)?

I am using Streamlit to build a web app and with Hydralit I was able to use the multipage function. However, the function came with an animated loader that I would like to remove. What command can ...

stackoverflow.com

아무도 답변하지 않는 질문에 처음으로 댓글을 달아보았다.

도움이 되면 좋겠다.

+ Recent posts