shideqin commited on
Commit
edffb64
1 Parent(s): a30857f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -6,6 +6,7 @@ def get_openai_key():
6
 
7
  def process_image(openai_api_key,image_src):
8
  print(openai_api_key)
 
9
  # Combine the outputs into a single HTML output
10
  custom_output = f'''
11
  <h2>Image->Text:</h2>
@@ -15,13 +16,10 @@ def process_image(openai_api_key,image_src):
15
  openai_api_key = gr.Textbox(value=get_openai_key(),label="OpenAI API Key",type="password")
16
  image_input = gr.inputs.Image(type='filepath', label="Input Image")
17
 
18
- #os.environ["OPENAI_API_KEY"] = openai_api_key
19
-
20
  title_with_logo = \
21
  f'Understanding Image with Text'
22
 
23
- extra_title = r'![vistors](https://visitor-badge.glitch.me/badge?page_id=fingerrec.Image2Paragraph)' + '\n' + \
24
- r'[![Duplicate this Space](https://huggingface.co/datasets/huggingface/badges/raw/main/duplicate-this-space-md-dark.svg)](https://huggingface.co/spaces/Awiny/Image2Paragraph?duplicate=true)' + '\n\n'
25
 
26
  interface = gr.Interface(
27
  fn=lambda openai_api_key,image, options: process_image(openai_api_key,image),
 
6
 
7
  def process_image(openai_api_key,image_src):
8
  print(openai_api_key)
9
+ print(image_src)
10
  # Combine the outputs into a single HTML output
11
  custom_output = f'''
12
  <h2>Image->Text:</h2>
 
16
  openai_api_key = gr.Textbox(value=get_openai_key(),label="OpenAI API Key",type="password")
17
  image_input = gr.inputs.Image(type='filepath', label="Input Image")
18
 
 
 
19
  title_with_logo = \
20
  f'Understanding Image with Text'
21
 
22
+ extra_title = r'![vistors](https://visitor-badge.glitch.me/badge?page_id=fingerrec.Image2Paragraph)\n\n'
 
23
 
24
  interface = gr.Interface(
25
  fn=lambda openai_api_key,image, options: process_image(openai_api_key,image),