Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,18 +1,4 @@
|
|
| 1 |
-
# NEW Cell 1: Install PyPDF2 aggressively and other core libs
|
| 2 |
-
!pip install -q PyPDF2
|
| 3 |
-
!pip install -q --upgrade PyPDF2 # Ensure it's the latest
|
| 4 |
-
!pip install -q transformers accelerate bitsandbytes gradio google-search-results
|
| 5 |
-
!pip install -q --upgrade transformers accelerate bitsandbytes gradio # Upgrade others
|
| 6 |
|
| 7 |
-
print("Core libraries installed.")
|
| 8 |
-
|
| 9 |
-
# Test the import of PyPDF2 immediately
|
| 10 |
-
try:
|
| 11 |
-
import PyPDF2
|
| 12 |
-
print("PyPDF2 imported successfully after installation.")
|
| 13 |
-
except ImportError:
|
| 14 |
-
print("Error: PyPDF2 still cannot be imported. There might be a deeper issue.")
|
| 15 |
-
pip install gradio transformers torch accelerate PyPDF2
|
| 16 |
import gradio as gr
|
| 17 |
import os
|
| 18 |
import torch
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
import gradio as gr
|
| 3 |
import os
|
| 4 |
import torch
|