shideqin commited on
Commit
be8c752
1 Parent(s): a10c2cf

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -10
app.py CHANGED
@@ -108,19 +108,14 @@ semantic_segment_checkbox = gr.inputs.Checkbox(label="Semantic Segment", default
108
  image_generation_checkbox = gr.inputs.Checkbox(label="Image Generation", default=False)
109
 
110
 
111
- extra_title = r'![vistors](https://visitor-badge.glitch.me/badge?page_id=fingerrec.Image2Paragraph)'+'\n\n'
112
-
113
-
114
-
115
- logo_base64 = add_logo()
116
- # Create the title with the logo
117
- title_with_logo = \
118
- f'Understanding Image with Text'+'\n\n'+'<img src="data:image/jpeg;base64,{logo_base64}" width="400" style="vertical-align: middle;">'
119
-
120
  examples = [
121
  ["examples/test_4.jpg"],
122
  ]
123
 
 
 
 
 
124
  # Create Gradio interface
125
  interface = gr.Interface(
126
  fn=lambda image, api_key, options: process_image(image, api_key, options, processor),
@@ -132,7 +127,7 @@ interface = gr.Interface(
132
  ),
133
  ],
134
  outputs=gr.outputs.HTML(),
135
- title=title_with_logo,
136
  examples=examples,
137
  description=extra_title +"""
138
  Image.txt. This code support image to text transformation. Then the generated text can do retrieval, question answering et al to conduct zero-shot.
 
108
  image_generation_checkbox = gr.inputs.Checkbox(label="Image Generation", default=False)
109
 
110
 
 
 
 
 
 
 
 
 
 
111
  examples = [
112
  ["examples/test_4.jpg"],
113
  ]
114
 
115
+ logo_base64 = add_logo()
116
+
117
+ extra_title = f'<img src="data:image/jpeg;base64,{logo_base64}" width="400" style="vertical-align: middle;">'+'\n\n'
118
+
119
  # Create Gradio interface
120
  interface = gr.Interface(
121
  fn=lambda image, api_key, options: process_image(image, api_key, options, processor),
 
127
  ),
128
  ],
129
  outputs=gr.outputs.HTML(),
130
+ title='Understanding Image with Text',
131
  examples=examples,
132
  description=extra_title +"""
133
  Image.txt. This code support image to text transformation. Then the generated text can do retrieval, question answering et al to conduct zero-shot.