155elkhorn commited on
Commit
26cbf5d
·
1 Parent(s): 0127e82

Update app.py

Browse files

Sending file type preference in http header

Files changed (1) hide show
  1. app.py +3 -0
app.py CHANGED
@@ -89,4 +89,7 @@ iface = gr.Interface(
89
  )
90
 
91
  if __name__ == "__main__":
 
 
 
92
  iface.launch()
 
89
  )
90
 
91
  if __name__ == "__main__":
92
+ # Set the Accept header to request images in a format-agnostic way, with other formats preferred over WebP
93
+ gr.config.INIT_HTTP_HEADERS["Accept"] = "image/*;q=0.9,image/webp;q=0.8"
94
+
95
  iface.launch()