nlewins commited on
Commit
d7f4671
1 Parent(s): ff81b16

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +10 -3
app.py CHANGED
@@ -1,5 +1,6 @@
1
 
2
 
 
3
  # import module
4
  import streamlit as st
5
 
@@ -12,11 +13,17 @@ dataset=""
12
  split=""
13
  skip=0
14
 
15
- column_with_audio="audio_transcription"
16
- column_with_english_text="en"
17
- column_with_other_text="transcription"
18
 
19
  def load():
 
 
 
 
 
 
 
 
 
20
  ds = datasets.load_dataset(dataset, token=access_token, split=datasets.ReadInstruction("test",from_=skip,to=skip+50))
21
  for example in ds:
22
  df=pd.DataFrame([example[column_with_other_text],example[column_with_english_text]])
 
1
 
2
 
3
+
4
  # import module
5
  import streamlit as st
6
 
 
13
  split=""
14
  skip=0
15
 
 
 
 
16
 
17
  def load():
18
+ if dataset=="nlewins/onetalk_questions_full_audio":
19
+ column_with_audio="audio_transcription"
20
+ column_with_english_text="en"
21
+ column_with_other_text="transcription"
22
+ elif dataset=="nlewins/LSK_full_with_audio":
23
+ column_with_audio="audio_transcription"
24
+ column_with_english_text="en"
25
+ column_with_other_text="transcription"
26
+
27
  ds = datasets.load_dataset(dataset, token=access_token, split=datasets.ReadInstruction("test",from_=skip,to=skip+50))
28
  for example in ds:
29
  df=pd.DataFrame([example[column_with_other_text],example[column_with_english_text]])