JimminDev commited on
Commit
a32dacf
·
verified ·
1 Parent(s): 60106f1

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -1
app.py CHANGED
@@ -1,4 +1,12 @@
1
- from transformers import pipeline, AutoModelForSequenceClassification, AutoTokenizer
 
 
 
 
 
 
 
 
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