Spaces:
Runtime error
Runtime error
update changes
Browse files- README.md +8 -0
- __pycache__/inference.cpython-39.pyc +0 -0
- inference.py +1 -0
README.md
CHANGED
@@ -10,3 +10,11 @@ pinned: false
|
|
10 |
---
|
11 |
|
12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
10 |
---
|
11 |
|
12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
13 |
+
|
14 |
+
### Performing inference with the trained model.
|
15 |
+
|
16 |
+
#### Run the command below to use gradio to run the model.
|
17 |
+
|
18 |
+
```cmd
|
19 |
+
python app.py
|
20 |
+
```
|
__pycache__/inference.cpython-39.pyc
CHANGED
Binary files a/__pycache__/inference.cpython-39.pyc and b/__pycache__/inference.cpython-39.pyc differ
|
|
inference.py
CHANGED
@@ -140,6 +140,7 @@ def deepfakes_image_predict(input_image):
|
|
140 |
|
141 |
out = nn.Softmax()(multimodal_grads)
|
142 |
max = torch.argmax(out, dim=-1) #Index of the max value in the tensor.
|
|
|
143 |
max_value = out[max] #Actual value of the tensor.
|
144 |
max_value = np.argmax(out[max].detach().numpy())
|
145 |
|
|
|
140 |
|
141 |
out = nn.Softmax()(multimodal_grads)
|
142 |
max = torch.argmax(out, dim=-1) #Index of the max value in the tensor.
|
143 |
+
max = max.cpu().detach().numpy()
|
144 |
max_value = out[max] #Actual value of the tensor.
|
145 |
max_value = np.argmax(out[max].detach().numpy())
|
146 |
|