pknayak commited on
Commit
3bb42a8
1 Parent(s): 78c6c57

Update app.py

Browse files

uncommenting 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.

Files changed (1) hide show
  1. app.py +5 -3
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
- # 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
- df = pd.DataFrame(data, columns=columns)
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