예제 #1
0
def get_next_label_card():
    query = get_next_AL_query()

    # no more!
    if not query:
        return None

    box, start_time, end_time = query

    # Time segment as title, (Data Graph), Gif all displayed in a card.
    heading = start_time + " - " + end_time
    fig = graph_data(box, start_time, end_time, ["All Channels"])
    gif_name = create_gif(box, start_time, end_time)

    card_content = [
        dbc.CardBody([
            html.H5("Please Provide a label for the following segment",
                    className="card-title"),
            html.H6(heading),
            html.Div(
                [Gif.GifPlayer(gif=gif_name, still=gif_name[:-3] + ".png")]),
            dcc.Graph(figure=fig)
        ]),
    ]

    return card_content
def get_gif(n_clicks, data):

    data = list(json.loads(json.dumps(data[0])).values())
    data = [x for x in data if pd.notnull(x)]
    if not data:
        return html.H3("Your activity will appear here")
    if len(data) == 562:
        data = data[:-1]

    else:
        return html.H3('Please, make sure that all blank cells contain data')

    data = [data]
    s = classifer.predict(data)
    if s == ['LAYING']:
        gif = 'https://media.tenor.com/images/2d010e4d537648a8af03b006e6a3fdd9/tenor.gif'
        still = app.get_asset_url("laying.png"),

    elif s == ['SITTING']:
        gif = 'https://i.pinimg.com/originals/f4/c3/da/f4c3da24fac962cee926c4595ce46923.gif'
        still = app.get_asset_url("sitting.png"),

    elif s == ['STANDING']:
        gif = 'https://i.pinimg.com/originals/fb/69/b0/fb69b0b94fd3e40bf041be3db4b8b5e9.gif'
        still = app.get_asset_url("standing.png"),

    elif s == ['WALKING']:
        gif = 'http://blogs.studentlife.utoronto.ca/lifeatuoft/files/2018/11/72f02440701089.57894e458a58b.gif'
        still = app.get_asset_url("walking .png"),

    elif s == ['WALKING_DOWNSTAIRS']:
        gif = 'https://thumbs.gfycat.com/FondFlusteredIvorybilledwoodpecker-size_restricted.gif'
        still = app.get_asset_url("wds.png"),

    elif s == ['WALKING_UPSTAIRS']:
        gif = 'https://cdn2.scratch.mit.edu/get_image/gallery/5658656_170x100.png'
        still = app.get_asset_url("wus.png"),

    return html.Div([
        Gif.GifPlayer(
            gif=gif,
            still=still[0],
            autoplay=True,
        ),
    ])


# try this data the user is walking:
#0.31263404,-0.026367749,-0.13095121,-0.3530986,-0.01738215,-0.1278076,-0.39527374,-0.0543888,-0.095763059,-0.29039716,-0.14554645,-0.19315657,0.28053625,-0.02305703,0.39875442,-0.14859591,-0.7891772,-0.81300152,-0.65669769,-0.46625697,-0.35449084,-0.076900473,0.36336909,0.38204084,0.018222124,-0.35435942,0.1954133,0.18395289,-0.11210916,-0.25797663,0.3126983,-0.060445461,0.15767416,-0.37885352,0.28878928,-0.065076673,-0.19578783,-0.20380286,-0.033051808,0.34722497,0.94691727,-0.26205559,-0.020235796,-0.9850642,-0.94652431,-0.83709377,-0.98656429,-0.95768667,-0.84192698,0.87654171,-0.27383035,0.008912625,0.95787983,-0.2653281,-0.066073,-0.29318366,0.85618709,-0.88497202,-0.99749767,-0.99028678,-0.98088501,-0.84757716,-1,-1,-0.69833923,-0.4923716,0.5678772,-0.64258496,0.71645958,-0.23299274,0.24871294,-0.31873091,0.40964336,-0.68734168,0.69941204,-0.71089176,0.71883643,0.71172858,0.72725057,0.64532281,-0.094394668,0.013017354,-0.30579489,-0.30650885,-0.068948743,-0.60594792,-0.26180846,-0.082266065,-0.57439078,-0.62345012,-0.43528672,-0.81424129,0.16433001,0.085692605,0.43725651,-0.28019975,-0.75679758,-0.56177796,-0.9175564,-0.19670481,-0.33095367,-0.50899884,0.72431662,0.65090847,0.41613865,-0.32362457,0.071082293,0.30701579,-0.079226997,-0.41271868,0.37745559,-0.075324418,0.38717181,-0.32428058,0.14067928,0.061217451,-0.23726395,-0.28267794,-0.20707937,0.6667628,-0.23928593,0.078229978,0.043137262,-0.46501506,-0.16740045,-0.43151087,-0.47543749,-0.18577029,-0.46468858,-0.52838613,-0.47587563,-0.22219519,0.29240461,0.58087297,0.40165487,-0.2150521,-0.8405364,-0.65388669,-0.84885148,-0.45336831,-0.28017638,-0.63061242,-0.13880155,0.062191497,0.2426176,-0.46238695,0.25938451,0.42517769,-0.56765759,-0.4571042,0.46300897,-0.41819257,0.33756148,-0.32626704,0.39798666,-0.53689937,0.66487723,-0.1451654,0.082040898,0.04536196,0.034467284,-0.34622965,0.19077019,-0.28902666,-0.49804596,-0.54948827,-0.32184491,-0.52086368,-0.54105951,-0.26182559,-0.48085665,-0.58398099,0.31267113,0.53601577,0.64569391,-0.46891359,-0.74533756,-0.87297068,-0.8963348,-0.45450534,-0.54969046,-0.50555029,0.64361994,0.53646469,0.67613516,-0.22475144,0.026941594,0.31824947,0.3253255,-0.44443,0.46098498,-0.1724978,0.066385308,-0.43546963,0.47694341,-0.46065794,0.1335937,0.58433164,-0.23487023,-0.1435431,-0.1696296,-0.32073899,-0.37802238,-0.27682438,-0.63558527,-0.1696296,-0.64912028,-0.43840012,0.76189413,-0.09730924,0.025193085,0.031041608,0.043228105,-0.1696296,-0.32073899,-0.37802238,-0.27682438,-0.63558527,-0.1696296,-0.64912028,-0.43840012,0.76189413,-0.09730924,0.025193085,0.031041608,0.043228105,-0.28756092,-0.27400211,-0.33155011,-0.27509806,-0.34326231,-0.28756092,-0.73131457,-0.41583906,0.69045091,0.0087500811,0.00012225291,-0.20179033,0.14501513,-0.21472204,-0.22792935,-0.1170125,-0.39781524,-0.49210335,-0.21472204,-0.65980214,-0.10040395,0.52797983,-0.0015879448,-0.028831011,0.038606806,-0.080189392,-0.46434627,-0.46330737,-0.51363782,-0.43962213,-0.5148462,-0.46434627,-0.84919701,-0.58625354,0.92942022,-0.064977194,0.27908648,-0.35397063,-0.1760246,-0.2749068,-0.062349562,-0.31909457,-0.38657078,-0.055909878,-0.098385402,-0.26088506,-0.076015023,-0.18608503,-0.56052893,-0.35368948,-0.065185822,-0.39830449,-0.92102018,-0.9015767,-0.11471639,-0.78887397,-0.51220934,-0.61148715,-0.27728118,-0.36804635,-0.5927095,0.52973064,0.53066422,0.38178857,-0.80645161,-0.33333333,-0.92307692,-0.2490708,0.0013439574,-0.22652212,-0.33774508,-0.75527568,-0.35502774,-0.73418465,-0.078237573,-0.3807269,-0.83698894,-0.73595801,-0.7608114,-0.76003308,-0.92449311,-0.81587839,-0.91539137,-0.91998812,-0.79210545,-0.72313073,-0.88379257,-0.91693209,-0.78988274,-0.77281224,-0.73454903,-0.4448388,-0.80590483,-0.7495052,-0.78908683,-0.87929882,-0.88543084,-0.99827458,-0.51100842,-0.74004991,-0.79954584,-0.92933411,-0.51888439,-0.75233785,-0.57985646,-0.85011646,-0.90314141,-0.96389603,-0.97855038,-0.93386792,-0.90620804,-0.88184095,-0.6158334,-0.92518227,-0.96545106,-0.89811278,-0.60944428,-0.96435592,-0.32488554,-0.15821185,-0.56272771,-0.34905958,-0.032820151,-0.64777257,-0.18434277,-0.11187479,-0.58908177,-0.41965993,-0.10802593,-0.75145508,-0.66103403,-0.77265762,-0.88328737,-0.23957588,-0.75642179,-0.56179922,-0.91768109,-0.1466556,-0.35882734,-0.52591886,0.5718566,0.59295317,0.27205558,-0.52,-0.6,-0.44,-0.33298679,-0.40132381,-0.41857923,-0.23851322,-0.66540428,-0.089528226,-0.59627009,-0.63250551,-0.94594187,-0.86466437,-0.74419145,-0.80085618,-0.81639774,-0.95332705,-0.82029093,-0.92679153,-0.9606993,-0.7755424,-0.76122553,-0.89470092,-0.92046134,-0.74403272,-0.79370222,-0.81417329,-0.48107316,-0.75543911,-0.73249337,-0.80250887,-0.84681634,-0.86365988,-0.99037633,-0.48564719,-0.69542815,-0.77396141,-0.87964933,-0.51818976,-0.74492661,-0.85395772,-0.87008391,-0.92499446,-0.95230487,-0.97473512,-0.94052159,-0.94395609,-0.99074206,-0.83701608,-0.93837591,-0.96270933,-0.94576202,-0.87637697,-0.95641798,-0.3276796,-0.25778599,-0.35621853,-0.50858961,-0.12194059,-0.51041089,-0.34949394,-0.3110388,-0.38415107,-0.54302656,-0.15945756,-0.70431485,-0.93344367,-0.45929153,-0.44084397,-0.25882146,-0.85612689,-0.65210351,-0.83656295,-0.33431292,-0.41038051,-0.53771481,0.58744641,0.6506413,0.37390231,-0.33333333,-0.93548387,-0.5862069,-0.070288769,-0.11308313,-0.020525379,-0.34156456,-0.68430793,0.039102635,-0.34325879,-0.4106278,-0.78078179,-0.94176588,-0.43321254,-0.86888381,-0.95088706,-0.96545044,-0.90819682,-0.95806913,-0.95995967,-0.86238693,-0.87450144,-0.93866361,-0.95890568,-0.85759069,-0.94682305,-0.5104158,-0.94897541,-0.92995086,-0.91652543,-0.93088605,-0.92786663,-0.88809341,-0.88008617,-0.63716212,-0.90919988,-0.92956023,-0.86939275,-0.62949457,-0.91414061,-0.86972836,-0.91297461,-0.9564242,-0.95695194,-0.94586849,-0.91229201,-0.89596369,-0.90844162,-0.84691105,-0.93761089,-0.93663218,-0.90138888,-0.84177774,-0.95064905,-0.25871717,-0.46375538,-0.26177004,-0.66204365,-0.91953181,-0.25871717,-0.76474809,-0.39973615,0.44493725,-0.93103448,0.024106987,-0.64231585,-0.88387513,-0.21590346,-0.36040189,-0.24065679,-0.51015315,-0.018009841,-0.21590346,-0.73109646,-0.29374714,0.33628378,-0.9047619,0.015740678,-0.36629719,-0.73687222,-0.30917911,-0.30476058,-0.22241719,-0.38038878,-0.8920393,-0.30917911,-0.70031593,-0.22334376,0.64346088,-0.84615385,-0.038943067,-0.34411148,-0.67422888,-0.47289324,-0.48842516,-0.43005295,-0.53567704,-0.40341371,-0.47289324,-0.85476289,-0.40754818,0.48353643,-0.9047619,-0.020913284,-0.20147706,-0.59466014,-0.51615414,0.46159389,0.92173483,-0.36722405,-0.7601763,0.26295137,0.035725938,"1"
예제 #3
0
def run_sim(n_clicks, num_nodes, num_iterations, num_ants, evap_rate, alpha,
            beta, Q):  #, iterations, num_nodes,num_ants,evap,alpha,beta,Q):

    if dash.callback_context.triggered[0]["prop_id"] == ".":
        return dash.no_update

    #consts = Constants()
    print("num_nodes: ", num_nodes)

    if num_nodes == None:
        num_nodes = 10
    if num_iterations == None:
        num_iterations = 50
    if num_ants == None:
        num_ants = 4
    if evap_rate == None:
        evap_rate = .2
    if alpha == None:
        alpha = 1
    if beta == None:
        beta = 1
    if Q == None:
        Q = 1

    print("ABOUT TO RUN SIMULATION, n_clicks = ", n_clicks)

    print("number of nodes: ", num_nodes)
    print("num_iterations: ", num_iterations)
    print("num_ants: ", num_ants)
    print("evap_rate: ", evap_rate)
    print("alpha: ", alpha)
    print("beta: ", beta)
    print("Q: ", Q)

    alg(num_iterations, num_ants, evap_rate, Q, alpha, beta, num_nodes,
        n_clicks)

    print("RAN SIMULATION")

    #will this refresh the gif thing?
    fname_gif = "assets/aco_" + str(n_clicks) + ".gif"
    fname_still = "assets/still_" + str(n_clicks) + ".png"

    print("loading : ", fname_gif)
    print("and: ", fname_still)

    return gif.GifPlayer(gif=fname_gif, still=fname_still)
예제 #4
0
def display_selected_data(selectedData, box):
    if not selectedData:
        raise PreventUpdate
    # print("selectedData------------------------------>",selectedData)
    # print("type(selectedData)-------------------------------->",type(selectedData))
    rnge = selectedData['range']

    # weird string processing step to work on any subplot
    xx = [key for key in rnge.keys() if 'x' in key]
    print("found ", xx)

    start_time, end_time = rnge[xx[0]][0], rnge[xx[0]][1]

    gif_name = create_gif(box, start_time, end_time)

    gif_player = Gif.GifPlayer(gif=gif_name, still=gif_name[:-3] + ".png")

    return [json.dumps(selectedData, indent=2), gif_player]
예제 #5
0
def display_video_features(chamber_type, sex, age_group, aging_rate,
                           data_videos):
    chronological_age, biological_age = (pd.DataFrame(data_videos).set_index(
        ["chamber", "sex", "age_group",
         "aging_rate"]).loc[(int(chamber_type), sex, age_group, aging_rate),
                            ["chronological_age", "biological_age"]].tolist())
    title = f"The participant is a {aging_rate} ager: {np.round_(biological_age - chronological_age, 1)} years"

    gif_display = html.Div(
        gif.GifPlayer(
            gif=
            f"../data/feature_importances/videos/{chamber_type}_chambers/{sex}/{age_group}/{aging_rate}.gif",
            still=
            f"../data/feature_importances/videos/{chamber_type}_chambers/{sex}/{age_group}/{aging_rate}.png",
        ),
        style={"padding-left": 400},
    )
    return gif_display, title
예제 #6
0
def municipalities():
    return [
        html.H2(gettext("Municipalities")),
        html.P(
            get_translation(
                en=
                """Number of positive cases per 1000 inhabitants since beginning of March 2020""",
                fr=
                """Nombre de cas positifs par 1000 habitants depuis le début du mois de Mars 2020""",
            )),
        html.Div([
            Gif.GifPlayer(
                gif='/assets/media/map_cases1000.gif',
                still='/assets/media/2020-03-01_per1000.png',
            )
        ]),
        html.H3(gettext("Where are the epidemic focuses?")),
        dcc.Graph(id='cases-overview-map-communes-p',
                  figure=map_communes_per_inhabitant(),
                  config=dict(locale=str(get_locale()))),
        html.H3(gettext("Cases per municipality")),
        html.H4(
            gettext(
                "Click on a municipality to see a plot of its cases over time")
        ),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='cases-overview-map-communes',
                          figure=map_communes(),
                          config=dict(locale=str(get_locale()))))
        ]),
        dbc.Row([
            dbc.Col(
                dcc.Graph(id='cases-overview-histogram',
                          figure=barplot_communes(),
                          style={"display": "none"},
                          config=dict(locale=str(get_locale()))))
        ]),
        display_source_providers(source_sciensano, source_map_communes,
                                 source_pop)
    ]
예제 #7
0
def display_gif(chamber_type, sex, age_group, sample, data_videos):
    chronological_age = (pd.DataFrame(data_videos).set_index(
        ["chamber", "sex", "age_group",
         "sample"]).loc[(int(chamber_type), sex, age_group, int(sample)),
                        ["chronological_age"]].tolist())
    index_in_age_ranges = np.searchsorted(AGE_RANGES, chronological_age)

    title = f"The participant is between {AGE_RANGES[index_in_age_ranges - 1][0]} and {AGE_RANGES[index_in_age_ranges][0]} years old"

    gif_display = html.Div(
        gif.GifPlayer(
            gif=
            f"../data/datasets/videos/{chamber_type}_chambers/{sex}/{age_group}/sample_{sample}.gif",
            still=
            f"../data/datasets/videos/{chamber_type}_chambers/{sex}/{age_group}/sample_{sample}.png",
        ),
        style={
            "height": "100%",
            "width": "100%",
            "margin-left": "30%"
        },
    )
    return gif_display, title
 The code for this dashboard and an analysis of the data can be found in this [GitHub repo](https://github.com/AvonleaFisher/Analyzing-NYC-311-Service-Requests).
 ''',
                  style={
                      'margin-left': 100,
                      'margin-right': 150,
                      'fontSize': 27
                  }),
     html.H1('Daily Call Volume by Month',
             style={
                 'color': '#113c3c',
                 'fontSize': 30,
                 'text-align': 'left',
                 'margin-left': 100
             }),
     html.Div(gif.GifPlayer(gif='assets/June.gif',
                            still='assets/June.gif',
                            autoplay=True),
              style={
                  'marginLeft': 130,
                  'width': '31%',
                  'display': 'inline-block'
              }),
     html.Div(gif.GifPlayer(gif='assets/July.gif',
                            still='assets/July.gif',
                            autoplay=True),
              style={
                  'width': '31%',
                  'display': 'inline-block'
              }),
     html.Div(gif.GifPlayer(gif='assets/august.gif',
                            still='assets/august.gif',
예제 #9
0
def render_gif(param='NOX'):
    gp = Gif.GifPlayer(gif='assets/' + param + '.gif',
                       still='assets/' + param + '_29.png')
    return gp
예제 #10
0
    #############################################################################################define the row

    #paragraph about ant optimization

    #applications

    #demo
    ################################################################################################
    html.Div(
        [
            html.Div(id='exp_gif'),
            html.Div(id='gif_viewer',
                     children=[
                         gif.GifPlayer(
                             gif='assets/aco.gif',
                             still='assets/still.png',
                         ),
                     ],
                     style={'display': 'inline-block'}),

            ######################### input div: num_nodes ############################
            html.Div(
                children=[

                    #html.Div(id='container-button-basic',
                    html.Button(
                        'Run Simulation', id='run_simulation', n_clicks=0),
                    html.Div(id='sim_status',
                             style={
                                 'display': 'inline-block',
                                 'margin-right': "10px"
Script to create the dashboard about project information. Here it is 
designed the page structure, all callback functions are defined in the main script.

"""

import dash_core_components as dcc
import dash_html_components as html
import dash_gif_component as gif

Project_Overview_layout = html.Div([
    html.H4(className='tab-title',
            children=['Piccolo Kitchen Project Overview']),
    html.Div(
        className='five columns container',
        children=[
            html.H6(children=['Brief description: ']),
            html.P(children=[
                'This project aims to create a modular platform for exploring micro-kitchens that are culture specific. Cooking is a personal experience that has cultural attributes. This project explores new modes of cooking using robotically enabled cabinets and appliances to minimize the footprint of the kitchen, while maximizing the ability for users to cook large meals, socialize, and utilize the same space during non-meal times for work. Piccolo kitchen is one of the components of the micro-units that are currently under development as part of the CityHome 02 projects.'
            ],
                   style={'margin': '20px'})
        ]),
    html.Div(
        className='six columns',
        children=[
            gif.GifPlayer(
                gif='../assets/Kitchen+Unit.gif',
                still='../assets/Kitchen+Unit.jpg',
                #                        autoplay=False
            )
        ])
])
예제 #12
0
import dash_core_components as dcc
import dash_bootstrap_components as dbc
import dash_html_components as html
import dash_player as player
import json
import pandas as pd
df = pd.read_csv('Data/state wise centroids.csv')
home= html.Div(children=[   
     html.Div([
                html.Div([
                    html.Div([                        
                        html.Div([
                        html.Div([
                             gif.GifPlayer(
                             gif='assets/Images/wallcrop.gif',
                             still='assets/Images/wall.png',
                             autoplay=True,
                             )
                            ], className="media-body")                          
                    ], className="media pb-6 pt-4"),
                    html.Div([
                        html.Br(),
                        html.P("Geovisualization provides a deep insights of various Socio-economic problems of Indian States.", className="lead"),
                        
                    ])                  
                ], className="d-flex flex-column justify-content-start align-items-center rounded-lg shadow-lg p-3 rounded dashboard-header")
            ],className="w-85 mb-9" ), 
    html.Div([
                html.Div([

                        html.Img(src="assets/Images/indiaglobe.png", width="120", height="120", className="img-logo align-self-center"),
예제 #13
0
         'Easily convert your images to editable documents in the blink of an eye!',
         style={
             'textAlign': 'center',
             'color': colors['text'],
             'fontSize': 18,
         },
         className='twelve columns'),
     html.Div(id='mygif',
              style={
                  'width': '640px',
                  'height': '360px',
                  'display': 'inline-block'
              },
              children=[
                  Gif.GifPlayer(
                      gif='assets/mygif.gif',
                      still='assets/still.jpg',
                  )
              ]),
 ],
          className='row',
          style={'textAlign': 'center'}),
 html.Br(),
 html.Br(),
 html.Div(children=[
     html.Div(['Select the language(s) in the image: ']),
     dcc.Dropdown(id='language-dropdown',
                  options=[
                      {
                          'label': 'English',
                          'value': 'eng'
                      },
예제 #14
0
                html.P(
                children = "A web page dedicated to analyze"
                " the behavior of avocado prices in US"
                " between 2015 and 2018",
                className = "description"
                ),
                    
        ],
        className = "header"
    ),
        #Add a div with navbar over here
        nav_bar.navBar,

        #Add gif here
        html.Div(
            gif.GifPlayer(
                gif = path_to_gif,
                still = path_to_still
            )
        ),
    
        html.Div(id = "footer_body",
                children = [
                    html.Img(src = encode_image(path_to_image)),
                    html.P("Because we all love AVOCADOS!", className = "description_footer")
                            
            
    ],
        className = "footer"),
    ],
)
예제 #15
0
layout = dict(title="Projected Load Curve", showlegend=True)
layout_1 = dict(title="7-Day Historical Load Curve", showlegend=True)

fig = dict(data=DATA, layout=layout)
fig_1 = dict(data=DATA_1, layout=layout_1)

app = dash.Dash(__name__)

app.layout = html.Div([
    html.Div([
        html.Div([
            html.H1(id='title', children='Welcome to Peaky Finders'),
        ],
                 className="six columns"),
        html.Div([
            Gif.GifPlayer(gif='assets/giphy.gif', still='assets/giphy.gif'),
        ],
                 className="six columns"),
    ],
             className='row'),
    html.Div([
        html.H5(id='drop-down-title', children='Select your ISO'),
        html.Div(
            dcc.Dropdown(options=[
                {
                    'label': 'NYISO',
                    'value': 'NYISO'
                },
                {
                    'label': 'PJM',
                    'value': 'PJM'
예제 #16
0
app = dash.Dash(__name__)


app.layout = html.Div([
    dcc.Tabs(
        id='tabs',
        value='main',
        children=[
            dcc.Tab(
                label='main',
                value='main',
                children=[html.H1('main')],
            ),
            dcc.Tab(
                label='gif',
                value='gif',
                children=[
                    gif.GifPlayer(
                        gif='assets/giphy.gif',
                        still='assets/giphy.png',
                        alt='adorable puppy',
                    )]
            )
        ])
])


if __name__ == '__main__':
    app.run_server(debug=True, host='0.0.0.0', port='3002')
예제 #17
0
             style={
                 "font-size": "17px",
                 "letter-spacing": "2px",
                 "text-align": "center",
                 "margin": "auto",
             },
         )
     ], ),
     dbc.ModalBody(
         [
             html.
             P("This website helps you find connections between wikipedia articles."
               ),
             html.Div(
                 Gif.GifPlayer(
                     gif="assets/dropdown.gif",
                     still="assets/dropdown.png",
                 )),
             html.
             P("Use the dropdown to create connections. In the first graph, which has blue points, the dropdown has names of articles that are mentioned in the parent article. For example, the wikipedia article of Atom mentions the wikipedia article of Electron. The Cluster of Atom will have Electron as a point. You can similarly expand the cluster of Electron and see what articles are mentioned in it's article. You can do that by selecting electron from the dropdown. "
               ),
             html.
             P("The second graph is the exact opposite of the first graph. Here, the articles that mention the article of Atom, surround it. For example, the wikipedia article of Albert Einstein mentions the wikipedia article of Atom. Hence, it is a point in the cluster of Atom. If you select Albert Einstein from the dropdown, all the articles which mention Albert Einstein will surround it. "
               ),
         ],
         style={"font-size": "14px"},
     ),
     dbc.ModalFooter(
         dbc.Button(
             "Close", id="close-help", className="ml-auto")),
 ],
 id="help",
예제 #18
0
파일: app.py 프로젝트: sachn1/iml-lime
app.title = 'Rusklainer'
app.layout = html.Div([
        html.Div(
                ############################################
                #   Web Page Banner: GIF + Title
                ############################################
                className='banner',
                children=[
                    html.Div(
                            className='container scalable',
                            children = [
                                    html.Div([
                                     html.H6(
                                        id='banner-title',
                                        children=html.Span([html.Span(children=[gif.GifPlayer(gif='assets/gif2.gif',still='assets/gif2.gif')], className='gif_player playing'), html.Span('RUSKLAINER', style={'fontSize': 35, 'fontWeight': 'bold'}), html.Span(' | ', style={'fontSize': 45,}), 'Identification of contributing features towards ' , html.Span('RU', style={'fontWeight': 'bold'}), 'pture ri', html.Span('SK', style={'fontWeight': 'bold'}), ' prediction using ',  
                                                             html.Span('L', style={'fontWeight': 'bold'}), 'ime expl', html.Span('AINER', style={'fontWeight': 'bold'})]),
                                        style={
                                            "color": "black"
                                        }),
                                    ]),
                    ]),
                     
        ]),
        ############################################
        #   Initialize Web Page Tabs
        ############################################
        dcc.Tabs(
                id="tabs-with-classes",
                value='tab-1',
                parent_className='custom-tabs',
예제 #19
0
파일: app.py 프로젝트: adam0ling/nlp_app
              'textAlign': 'center',
              'color': colors['text'],
              'padding': 10
          }),
 html.Div(
     [
         dbc.Modal(
             [
                 dbc.ModalHeader(id='question_modal'),
                 dbc.ModalBody(children=[
                     html.Div(
                         'Cyber monkeys are trying to find the typewriter...',
                         id='answer_1'),
                     html.Div(children=[
                         gif.GifPlayer(gif='../assets/monkey.gif',
                                       still='../assets/monkey_still.png',
                                       autoplay=True),
                     ],
                              style={
                                  'textAlign': 'center',
                                  'color': colors['text'],
                                  'padding': 10
                              },
                              id='monkeys')
                 ]),
                 dbc.ModalFooter(
                     dbc.Button("Close",
                                id="close",
                                color='light',
                                className="ml-auto")),
             ],
예제 #20
0
    try:
        return update_map_chantier(chantier), ""
    except:
        return empty_figure(), "Aucune donnée à afficher"


#### Création d'une zone depliable associé au bouton 'Aide'
collapse = html.Div([
    html.Br(),
    dbc.Row(dbc.Button(id="help", className="fas fa-info-circle"),
            justify="center"),
    dbc.Collapse(
        dbc.Card(
            dbc.CardBody([
                dbc.Row(
                    gif.GifPlayer(gif="assets/help.gif", still="statique.png"),
                    justify="center",
                )
            ])),
        id="card-help",
    ),
])


@app.callback(
    Output("card-help", "is_open"),
    [Input("help", "n_clicks")],
    [State("card-help", "is_open")],
)
def collapse_parametres(n, is_open):
    ''' Ouvre ou ferme la zone ci-dessus
예제 #21
0
                      'height': '15px',
                      'width': '15px'
                  }),
         dbc.Modal(
             [
                 dbc.ModalHeader("Header"),
                 dbc.ModalBody(children=[
                     "The map to can be used to filter the bar chart and heatmap. "
                     "Select the points using plotly lasso select and box select. ",
                     "To reset selection double click an empty area of the map. ",
                     "You can also view the street construction permits by hovering on "
                     "the permit and clicking 'View PDF' ",
                     "To reset selection double click an empty area of the plot."
                 ]),
                 Gif.GifPlayer(
                     gif='assets/map_filter.gif',
                     still='assets/map_filter.png',
                 ),
                 dbc.ModalFooter(
                     dbc.Button("Close",
                                id="close-mapgraph-info",
                                className="ml-auto")),
             ],
             id="modal-mapgraph",
         ),
     ],
              className="row",
              style={'padding': '0px 20px 20px 20px'}),
     dcc.Graph(id='map-graph',
               animate=False,
               style={'margin-top': '20'})
 ],