rayl-aoit commited on
Commit
c836a14
·
verified ·
1 Parent(s): d0bce20

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +7 -10
app.py CHANGED
@@ -19,13 +19,12 @@ def create_playground_footer():
19
  **To Learn More about 🤗 Hugging Face, [Click Here](https://huggingface.co/docs)**
20
  """)
21
 
22
- def create_tabs_header(topic, description):
23
  with gr.Row():
24
  with gr.Column(scale=4):
25
- gr.Markdown(f"""
26
- ## {topic}
27
- > {description}
28
- """)
29
  with gr.Column(scale=1):
30
  test_pipeline_button = gr.Button(value="Process")
31
  return test_pipeline_button
@@ -34,13 +33,11 @@ with playground:
34
  create_playground_header()
35
  with gr.Tabs():
36
  with gr.TabItem("Image"):
 
37
  topic = "Image Captioning"
38
- description = ["model='Salesforce/blip-image-captioning-base'"]
39
- # image_pipeline_button = create_tabs_header("Image Captioning")
40
  image_pipeline_button = create_tabs_header(topic, description)
41
- gr.Markdown("""
42
- > model='Salesforce/blip-image-captioning-base'
43
- """)
44
  with gr.Row(visible=True) as use_pipeline:
45
  with gr.Column():
46
  img = gr.Image(type='pil')
 
19
  **To Learn More about 🤗 Hugging Face, [Click Here](https://huggingface.co/docs)**
20
  """)
21
 
22
+ def create_tabs_header(topic, descriptions):
23
  with gr.Row():
24
  with gr.Column(scale=4):
25
+ gr.Markdown(f"## {topic}")
26
+ gr.Markdown(f"## {description}") for description in descriptions
27
+
 
28
  with gr.Column(scale=1):
29
  test_pipeline_button = gr.Button(value="Process")
30
  return test_pipeline_button
 
33
  create_playground_header()
34
  with gr.Tabs():
35
  with gr.TabItem("Image"):
36
+
37
  topic = "Image Captioning"
38
+ descriptions = ["Image-to-Text","model='Salesforce/blip-image-captioning-base'","[https://huggingface.co/Salesforce/blip-image-captioning-base](https://huggingface.co/Salesforce/blip-image-captioning-base)"]
 
39
  image_pipeline_button = create_tabs_header(topic, description)
40
+
 
 
41
  with gr.Row(visible=True) as use_pipeline:
42
  with gr.Column():
43
  img = gr.Image(type='pil')