sarlinpe commited on
Commit
f928554
·
1 Parent(s): 57d7f45

Fix Gradio issue for large plots

Browse files
Files changed (1) hide show
  1. app.py +6 -0
app.py CHANGED
@@ -1,3 +1,6 @@
 
 
 
1
  import gradio as gr
2
  import matplotlib.pyplot as plt
3
 
@@ -11,6 +14,9 @@ from maploc.utils.viz_localization import (
11
  plot_dense_rotations,
12
  )
13
 
 
 
 
14
 
15
  def run(image, address, tile_size_meters, num_rotations):
16
  image_path = image.name
 
1
+ import csv
2
+ import sys
3
+
4
  import gradio as gr
5
  import matplotlib.pyplot as plt
6
 
 
14
  plot_dense_rotations,
15
  )
16
 
17
+ # Avoid `_csv.Error: field larger than field limit` with large plots.
18
+ csv.field_size_limit(sys.maxsize)
19
+
20
 
21
  def run(image, address, tile_size_meters, num_rotations):
22
  image_path = image.name