gradio-app / gradio

Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!
http://www.gradio.app
Apache License 2.0
33.88k stars 2.57k forks source link

font size for TabItem not working #3807

Closed prasadkumar0590 closed 1 year ago

prasadkumar0590 commented 1 year ago

Describe the bug

How can we give styling for tabitem.

We are suing tabitem inside of blocks component tabitem text sholud be bold and font size should be 40px

Is there an existing issue for this?

Reproduction

no

Screenshot

No response

Logs

no logs

System Info

latest version of gradio

Severity

blocking all usage of gradio

abidlabs commented 1 year ago

Hi @prasadkumar0590 please include a code example to reproduce

prasadkumar0590 commented 1 year ago

import numpy as np import gradio as gr import os from PIL import Image app = gr.Blocks(theme=gr.themes.Monochrome())

FILE_PATH = os.path.join(os.path.dirname(file),'test_files/')

def test(x,y): im = Image.fromarray(x) im.save(FILE_PATH + "input.jpg") detections = main(FILE_PATH + "random.jpg") return [gr.Image.update(FILE_PATH + 'test.jpeg'),gr.Dropdown.update(choices=list(detections.keys())),gr.Tabs.update(selected=1)]

def drpd_change(x): return gr.Image.update(FILE_PATH + f'{x}_test_page.png')

with app: gr.Markdown("# Test APP") with gr.Tabs() as parent_tabs: with gr.TabItem("Home", id=0):
with gr.Tabs() as tabs: with gr.TabItem("Input Image", id=0): with gr.Row(): image_input = gr.Image()
with gr.Row():
image_button = gr.Button("Start processing")

            with gr.TabItem("Test Image",id=1):
                with gr.Row():
                    image_input1 = gr.Image().style(height=300) 
                    drpd = gr.Dropdown()
                with gr.Row():
                    gr.Label('ProcessedImage')
                    image_input3 = gr.Image().style(height=300)

    with gr.TabItem("Contact US", id=1):  
        gr.Label('About Page')

image_button.click(test, inputs=[image_input],outputs=[image_input1, drpd, tabs])
drpd.change(drpd_change,inputs=drpd,outputs=image_input3)

app.launch()

Home and Contact US are main tabs both tabs should be in bold and font size should be 40 px can we do that

abidlabs commented 1 year ago

Hi @prasadkumar0590 as far as I can see, there's no bug here. You haven't applied any sort of styling. It sounds like you should use custom css as mentioned here: https://gradio.app/custom-CSS-and-JS/

By the way, for general questions like this (that are not feature requests or bug reports), please ask in GitHub Discussions or our Discord. (I'll close this issue)

prasadkumar0590 commented 1 year ago

Hi @prasadkumar0590 as far as I can see, there's no bug here. You haven't applied any sort of styling. It sounds like you should use custom css as mentioned here: https://gradio.app/custom-CSS-and-JS/

By the way, for general questions like this (that are not feature requests or bug reports), please ask in GitHub Discussions or our Discord. (I'll close this issue)

Sure Thank you