Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -3,6 +3,12 @@ import numpy as np
|
|
| 3 |
import gradio as gr
|
| 4 |
import requests
|
| 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
def greet(payload):
|
| 7 |
response = requests.post("https://api-inference.huggingface.co/models/PoseyATX/Fenrir_Alpha", headers={"Authorization": "Bearer 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"}, json=payload)
|
| 8 |
return response.json()
|
|
|
|
| 3 |
import gradio as gr
|
| 4 |
import requests
|
| 5 |
|
| 6 |
+
import torch
|
| 7 |
+
print(f"Is CUDA available: {torch.cuda.is_available()}")
|
| 8 |
+
# True
|
| 9 |
+
print(f"CUDA device: {torch.cuda.get_device_name(torch.cuda.current_device())}")
|
| 10 |
+
# Tesla T4
|
| 11 |
+
|
| 12 |
def greet(payload):
|
| 13 |
response = requests.post("https://api-inference.huggingface.co/models/PoseyATX/Fenrir_Alpha", headers={"Authorization": "Bearer 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"}, json=payload)
|
| 14 |
return response.json()
|