Spaces:
Running
Running
Karol Idaszak
commited on
Commit
•
dc4ca5f
1
Parent(s):
4ecae1b
Update main.py
Browse files
main.py
CHANGED
@@ -144,10 +144,10 @@ def interference(example, page_number=0):
|
|
144 |
return image, table
|
145 |
except IndexError as e:
|
146 |
# Return a custom HTML-styled error message if an IndexError occurs
|
147 |
-
|
148 |
except Exception as e:
|
149 |
# Handle other exceptions
|
150 |
-
|
151 |
|
152 |
|
153 |
import gradio as gr
|
|
|
144 |
return image, table
|
145 |
except IndexError as e:
|
146 |
# Return a custom HTML-styled error message if an IndexError occurs
|
147 |
+
gr.Error("Error: in the current version of the model, the maximum number of words per page is 512.")
|
148 |
except Exception as e:
|
149 |
# Handle other exceptions
|
150 |
+
gr.Error(f"An error occurred: {e}")
|
151 |
|
152 |
|
153 |
import gradio as gr
|