Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -262,10 +262,6 @@ def process_pdf(pdf, fmt, ctx_size, snippet_num, prompt):
|
|
262 |
logging.error(f"Error processing PDF: {e}")
|
263 |
return f"Error processing PDF: {str(e)}", "", []
|
264 |
|
265 |
-
The main error is the context_size not being defined before it's used in the button click handlers. Let's fix the order of component definitions and handlers. Here's the corrected UI section:
|
266 |
-
python
|
267 |
-
|
268 |
-
Copy
|
269 |
# Main Interface
|
270 |
with gr.Blocks(theme=gr.themes.Default()) as demo:
|
271 |
# Store context size value
|
|
|
262 |
logging.error(f"Error processing PDF: {e}")
|
263 |
return f"Error processing PDF: {str(e)}", "", []
|
264 |
|
|
|
|
|
|
|
|
|
265 |
# Main Interface
|
266 |
with gr.Blocks(theme=gr.themes.Default()) as demo:
|
267 |
# Store context size value
|