Photon08 commited on
Commit
39d6a91
·
1 Parent(s): a7e78fb

Update app.py

Browse files

modified streamlit wirte and removed fpdf

Files changed (1) hide show
  1. app.py +1 -12
app.py CHANGED
@@ -51,18 +51,7 @@ else:
51
  if st.button("Generate"):
52
  lang_d,transcription,trans = predict(url,translation=tran_req,tran_lang=lang)
53
 
54
- st.write(lang_d)
55
- pdf = FPDF()
56
- pdf.add_page()
57
-
58
- pdf.set_font("Arial", size = 15)
59
-
60
- '''
61
- for words in transcription:
62
- pdf.cell(200, 10, txt = x, ln = 1, align = 'L')
63
- output = pdf.output("transcript.pdf")
64
- st.download(label="Click here to download the transcript", data=output, mime='pdf',file_name="transcript.pdf")
65
- '''
66
  canvas = Canvas("transcript.pdf")
67
  canvas.drawString(72, 72, transcription)
68
  canvas.save()
 
51
  if st.button("Generate"):
52
  lang_d,transcription,trans = predict(url,translation=tran_req,tran_lang=lang)
53
 
54
+ st.write(lang_d.keys(),lang_d.values())
 
 
 
 
 
 
 
 
 
 
 
55
  canvas = Canvas("transcript.pdf")
56
  canvas.drawString(72, 72, transcription)
57
  canvas.save()