Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,4 +1,4 @@
|
|
| 1 |
-
|
| 2 |
import random
|
| 3 |
import os
|
| 4 |
from typing import Tuple , Dict
|
|
@@ -114,7 +114,7 @@ def predict(img= None , link:str = None) -> str:
|
|
| 114 |
img = Image.fromarray(img)
|
| 115 |
img = transform(img)
|
| 116 |
img = img.unsqueeze(0)
|
| 117 |
-
answer += str((torch.argmax(model(img.to(device)))).
|
| 118 |
|
| 119 |
return answer , imgss
|
| 120 |
|
|
|
|
| 1 |
+
import gradio as gr
|
| 2 |
import random
|
| 3 |
import os
|
| 4 |
from typing import Tuple , Dict
|
|
|
|
| 114 |
img = Image.fromarray(img)
|
| 115 |
img = transform(img)
|
| 116 |
img = img.unsqueeze(0)
|
| 117 |
+
answer += str((torch.argmax(model(img.to(device)))).numpy())
|
| 118 |
|
| 119 |
return answer , imgss
|
| 120 |
|