Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -42,7 +42,7 @@ def predict(inp):
|
|
42 |
with torch.no_grad():
|
43 |
prediction = torch.nn.functional.softmax(model(inp)[0], dim=0)
|
44 |
#print(prediction)
|
45 |
-
confidences = {list(common_to_latin.keys())[i]: float(prediction[i]) for i in range(
|
46 |
return confidences
|
47 |
|
48 |
interface = gr.Interface(fn=predict,
|
|
|
42 |
with torch.no_grad():
|
43 |
prediction = torch.nn.functional.softmax(model(inp)[0], dim=0)
|
44 |
#print(prediction)
|
45 |
+
confidences = {list(common_to_latin.keys())[i]: float(prediction[i]) for i in range(32)}
|
46 |
return confidences
|
47 |
|
48 |
interface = gr.Interface(fn=predict,
|