ysharma HF staff commited on
Commit
9147ddc
1 Parent(s): abb9121

fixes bold rendering in placeholder

Browse files

Hi, the rendering doesn't seem to be working properly at the moment (see the attached image for reference).

![image.png](https://cdn-uploads.huggingface.co/production/uploads/60d2dc1007da9c17c72708f8/8X7DNXMxNvL7IvO_drhI4.png)

I think you removed the extra line between the image tag and the rest of the string from my previous PR. The text `**Qwen1.5-32B**` uses markdown syntax (double asterisks) to make the text bold. Now, when the markdown syntax is directly attached to the image tag without a line break, it confuses the markdown renderer, and the formatting doesn't work as expected.

To remedy this I suggest following change in this small PR -
The image tag `<img src="xyz" style="width:40%">` is followed by a space and then the text `<b>Qwen1.5-32B</b>`. The `<b>` tag is an HTML tag used to make the text bold. Since, HTML tags are not part of the markdown syntax and are treated as separate elements by the markdown renderer. Therefore, the image tag and the text can be on the same line without causing any rendering issues that way.

Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -69,7 +69,7 @@ def model_chat(query: Optional[str], history: Optional[History], system: str
69
 
70
  placeholder = """
71
  <img src="https://camo.githubusercontent.com/c9ae5235df8d579b955cb8829a97aaf41cfcfe20b4a955276f7eb066fa2f88d4/68747470733a2f2f7169616e77656e2d7265732e6f73732d616363656c65726174652e616c6979756e63732e636f6d2f6173736574732f626c6f672f7177656e312e352f6c6f676f5f7177656e312e352e6a7067" style="width:40%">
72
- **Qwen1.5-32B**: Fitting the Capstone of the Qwen1.5 Language Model Series
73
  """
74
 
75
  with gr.Blocks() as demo:
 
69
 
70
  placeholder = """
71
  <img src="https://camo.githubusercontent.com/c9ae5235df8d579b955cb8829a97aaf41cfcfe20b4a955276f7eb066fa2f88d4/68747470733a2f2f7169616e77656e2d7265732e6f73732d616363656c65726174652e616c6979756e63732e636f6d2f6173736574732f626c6f672f7177656e312e352f6c6f676f5f7177656e312e352e6a7067" style="width:40%">
72
+ <b>Qwen1.5-32B</b>: Fitting the Capstone of the Qwen1.5 Language Model Series
73
  """
74
 
75
  with gr.Blocks() as demo: