You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Reporting a potential bug where lowering the text size via gr.Blocks(theme = gr.themes.Default(text_size='sm',)) does not affect the size of the text in the chatbot. Oddly, this does work when increasing the text size to lg, but values of sm (and presumably lower) are ignored. See attached reproduction and screenshots for reference.
Have you searched existing issues? 🔎
I have searched and found no existing issues
Reproduction
import gradio as gr
import random
import time
# text_size='sm' is ignored (see screenshot 1) while text_size='lg' is obeyed (see screenshot 2)
with gr.Blocks(theme = gr.themes.Default(text_size='sm',)) as demo:
# with gr.Blocks(theme = gr.themes.Default(text_size='lg',)) as demo:
chatbot = gr.Chatbot()
msg = gr.Textbox()
clear = gr.ClearButton([msg, chatbot])
def respond(message, chat_history):
bot_message = random.choice(["How are you?", "I love you", "I'm very hungry"])
chat_history.append((message, bot_message))
time.sleep(2)
return "", chat_history
msg.submit(respond, [msg, chatbot], [msg, chatbot])
if __name__ == "__main__":
demo.launch()
```
### Screenshot
![ss1](https://github.com/gradio-app/gradio/assets/6372983/b35351c2-516c-4516-873f-d67a02301c39)
![ss2](https://github.com/gradio-app/gradio/assets/6372983/ac1c0b62-2199-49ee-851f-b2284fd72317)
### Logs
```shell
No error message to report.
System Info
Gradio Environment Information:
------------------------------
Operating System: Linux
gradio version: 4.11.0
gradio_client version: 0.7.3
------------------------------------------------
gradio dependencies in your environment:
aiofiles: 23.2.1
altair: 5.1.2
fastapi: 0.104.1
ffmpy: 0.3.1
gradio-client==0.7.3 is not installed.
httpx: 0.25.0
huggingface-hub: 0.19.4
importlib-resources: 6.1.0
jinja2: 3.1.2
markupsafe: 2.1.3
matplotlib: 3.8.1
numpy: 1.26.1
orjson: 3.9.10
packaging: 23.2
pandas: 2.1.2
pillow: 10.1.0
pydantic: 2.4.2
pydub: 0.25.1
python-multipart: 0.0.6
pyyaml: 6.0.1
semantic-version: 2.10.0
tomlkit==0.12.0 is not installed.
typer: 0.9.0
typing-extensions: 4.8.0
uvicorn: 0.23.2
authlib; extra == 'oauth' is not installed.
itsdangerous; extra == 'oauth' is not installed.
gradio_client dependencies in your environment:
fsspec: 2023.10.0
httpx: 0.25.0
huggingface-hub: 0.19.4
packaging: 23.2
typing-extensions: 4.8.0
websockets: 11.0.3
### Severity
I can work around it
The text was updated successfully, but these errors were encountered:
Describe the bug
Reporting a potential bug where lowering the text size via
gr.Blocks(theme = gr.themes.Default(text_size='sm',))
does not affect the size of the text in the chatbot. Oddly, this does work when increasing the text size tolg
, but values ofsm
(and presumably lower) are ignored. See attached reproduction and screenshots for reference.Have you searched existing issues? 🔎
Reproduction
System Info
The text was updated successfully, but these errors were encountered: