Gregoryjr
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -38,18 +38,18 @@ if con:
|
|
38 |
return probs.detach().numpy()[0]
|
39 |
probs = classify_sentence(text)
|
40 |
def find_largest_number(numbers):
|
41 |
-
|
42 |
print("List is empty.")
|
43 |
return None, None
|
44 |
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
max_num = numbers[i]
|
50 |
max_index = i
|
51 |
|
52 |
-
|
53 |
|
54 |
print(probs)
|
55 |
|
|
|
38 |
return probs.detach().numpy()[0]
|
39 |
probs = classify_sentence(text)
|
40 |
def find_largest_number(numbers):
|
41 |
+
if not numbers:
|
42 |
print("List is empty.")
|
43 |
return None, None
|
44 |
|
45 |
+
max_num = numbers[0]
|
46 |
+
max_index = 0
|
47 |
+
for i in range(1, len(numbers)):
|
48 |
+
if numbers[i] > max_num:
|
49 |
max_num = numbers[i]
|
50 |
max_index = i
|
51 |
|
52 |
+
return max_index
|
53 |
|
54 |
print(probs)
|
55 |
|