chrisjay commited on
Commit
0fa880c
1 Parent(s): bde7fa0

workaround for getting audio to display

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -72,11 +72,12 @@ def display_records():
72
  df = pd.read_csv(DATA_FILE)
73
  #df['audio'] = df['audio'].apply(lambda x: display(Audio(x,autoplay=True)))
74
  langs=df['language'].values
 
75
  audios = df['audio'].values
76
  texts=df['text'].values
77
 
78
  html = """<div>
79
- <table style="width:100%;border=1;text-align: center">
80
  <tr>
81
  <th>language</th>
82
  <th>audio</th>
 
72
  df = pd.read_csv(DATA_FILE)
73
  #df['audio'] = df['audio'].apply(lambda x: display(Audio(x,autoplay=True)))
74
  langs=df['language'].values
75
+ df['audio'] = df['audio'].apply(lambda x: x.replace('data/wav/','https://huggingface.co/datasets/chrisjay/crowd-speech-africa/resolve/main/wav/'))
76
  audios = df['audio'].values
77
  texts=df['text'].values
78
 
79
  html = """<div>
80
+ <table>
81
  <tr>
82
  <th>language</th>
83
  <th>audio</th>