Vihang28 commited on
Commit
95d6ce9
·
verified ·
1 Parent(s): 0ce68fa

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -45,7 +45,7 @@ def encode_image(image_path):
45
  def api_calling(image, prompt, api_key):
46
  base64_image = encode_image(image)
47
  if len(prompt) == 0:
48
- prompt = "Provide a brief description of the image."
49
 
50
 
51
  headers = {
@@ -85,7 +85,7 @@ def message_and_history(img_input_name, input, history, api_key):
85
  inp = ' '.join(s)
86
  output = api_calling(img_input_name,inp, api_key)
87
  if len(input) == 0:
88
- input = "Brief description of the image."
89
  history.append((input, output))
90
  else:
91
  history.append((input, output))
@@ -105,7 +105,7 @@ with block:
105
  with gr.Row():
106
  with gr.Column():
107
  image_name = gr.Textbox(label="""
108
- Note: To check the image provide single name and to compare provide bothe the images names separated by a comma(,)
109
  """)
110
  show_button = gr.Button(value="Show Images")
111
  output_img = gr.Image(type="filepath")
 
45
  def api_calling(image, prompt, api_key):
46
  base64_image = encode_image(image)
47
  if len(prompt) == 0:
48
+ prompt = "Compare the two graphs shown in the image and list the differences?"
49
 
50
 
51
  headers = {
 
85
  inp = ' '.join(s)
86
  output = api_calling(img_input_name,inp, api_key)
87
  if len(input) == 0:
88
+ input = "Difference between the graphs."
89
  history.append((input, output))
90
  else:
91
  history.append((input, output))
 
105
  with gr.Row():
106
  with gr.Column():
107
  image_name = gr.Textbox(label="""
108
+ Note: To check the image provide single name and to compare provide both the image names separated by a comma(,)
109
  """)
110
  show_button = gr.Button(value="Show Images")
111
  output_img = gr.Image(type="filepath")