Update app.py
Browse files
app.py
CHANGED
|
@@ -2,7 +2,7 @@ import gradio as gr
|
|
| 2 |
from transformers import pipeline
|
| 3 |
import torch
|
| 4 |
|
| 5 |
-
# Check if a GPU is available
|
| 6 |
device = 0 if torch.cuda.is_available() else -1
|
| 7 |
|
| 8 |
# Load the text-generation pipeline with the appropriate device
|
|
|
|
| 2 |
from transformers import pipeline
|
| 3 |
import torch
|
| 4 |
|
| 5 |
+
# Check if a GPU is available
|
| 6 |
device = 0 if torch.cuda.is_available() else -1
|
| 7 |
|
| 8 |
# Load the text-generation pipeline with the appropriate device
|