Update app.py
Browse files
app.py
CHANGED
@@ -1,4 +1,12 @@
|
|
1 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2 |
import gradio as gr
|
3 |
|
4 |
# Initialize sentiment_analysis as None
|
|
|
1 |
+
# Check for PyTorch installation
|
2 |
+
try:
|
3 |
+
import torch
|
4 |
+
print(f"PyTorch version: {torch.__version__}")
|
5 |
+
except ImportError:
|
6 |
+
print("PyTorch is not installed. Please install PyTorch to run this script.")
|
7 |
+
raise
|
8 |
+
|
9 |
+
from transformers import pipeline
|
10 |
import gradio as gr
|
11 |
|
12 |
# Initialize sentiment_analysis as None
|