Spaces:
Sleeping
Sleeping
Update app.py
Browse filesuncommenting the data line to show dummy values for the time being.
adding the exception to the program to show the required message where there is no value in data.
app.py
CHANGED
@@ -11,12 +11,14 @@ def upload_file(files): # the actual translation should happen here
|
|
11 |
|
12 |
# Define the data as lists. Here the data would be sent in the form of single data fro mthe data
|
13 |
|
14 |
-
|
15 |
|
16 |
|
17 |
# Create the DataFrameoutputs
|
18 |
-
|
19 |
-
|
|
|
|
|
20 |
return df
|
21 |
|
22 |
|
|
|
11 |
|
12 |
# Define the data as lists. Here the data would be sent in the form of single data fro mthe data
|
13 |
|
14 |
+
data = [ ["ca_1.wav", "बिना किसी पूर्व सूचना के विलंबित या रद्द की गई ट्रिनिक", "without any prior information or any delay or delay in the train journey", "hindi"]]
|
15 |
|
16 |
|
17 |
# Create the DataFrameoutputs
|
18 |
+
if data is not None:
|
19 |
+
df = pd.DataFrame(data, columns=columns)
|
20 |
+
else:
|
21 |
+
raise ValueError("Data is None. Cannot create DataFrame.")
|
22 |
return df
|
23 |
|
24 |
|