Spaces:
Runtime error
Runtime error
Commit ·
4560649
1
Parent(s): 95727ab
Update app.py
Browse files
app.py
CHANGED
|
@@ -11,17 +11,11 @@ from simpletransformers.classification import ClassificationModel
|
|
| 11 |
from transformers import pipeline
|
| 12 |
import gradio as gr
|
| 13 |
|
| 14 |
-
# set working directory
|
| 15 |
-
# os.chdir('/Users/matthew.farant/dsw_solution')
|
| 16 |
-
|
| 17 |
def is_nan(text):
|
| 18 |
try:
|
| 19 |
-
# Attempt to convert the text to a float
|
| 20 |
value = float(text)
|
| 21 |
-
# Check if it's NaN
|
| 22 |
return math.isnan(value)
|
| 23 |
except ValueError:
|
| 24 |
-
# If the conversion to float fails, it's not a NaN
|
| 25 |
return False
|
| 26 |
|
| 27 |
# Function for preparing catalog
|
|
|
|
| 11 |
from transformers import pipeline
|
| 12 |
import gradio as gr
|
| 13 |
|
|
|
|
|
|
|
|
|
|
| 14 |
def is_nan(text):
|
| 15 |
try:
|
|
|
|
| 16 |
value = float(text)
|
|
|
|
| 17 |
return math.isnan(value)
|
| 18 |
except ValueError:
|
|
|
|
| 19 |
return False
|
| 20 |
|
| 21 |
# Function for preparing catalog
|