saivarun04 commited on
Commit
aa3917f
·
verified ·
1 Parent(s): 663d79a

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -4
app.py CHANGED
@@ -24,9 +24,7 @@ def generate_caption(image):
24
  "Describe this image in one concise, natural sentence.",
25
  image
26
  ])
27
-
28
  return response.text.strip()
29
-
30
  except Exception as e:
31
  return f"Error: {str(e)}"
32
 
@@ -39,5 +37,6 @@ interface = gr.Interface(
39
  description="Upload an image to get a caption generated"
40
  )
41
 
42
- if _name_ == "_main_":
43
- interface.launch()
 
 
24
  "Describe this image in one concise, natural sentence.",
25
  image
26
  ])
 
27
  return response.text.strip()
 
28
  except Exception as e:
29
  return f"Error: {str(e)}"
30
 
 
37
  description="Upload an image to get a caption generated"
38
  )
39
 
40
+ # Corrected this line
41
+ if __name__ == "__main__":
42
+ interface.launch()