Ignore error while generating pdf

I added a feature to download a pdf which I have generated. Everything’s working fine and I am getting a generated pdf also but I am still getting an error:

TypeError: 'str' object is not callable


File "c:\users\91935\appdata\local\programs\python\python36\lib\site-packages\streamlit\script_runner.py", line 376, in _run_script
    self._session_state.call_callbacks()File "c:\users\91935\appdata\local\programs\python\python36\lib\site-packages\streamlit\state\session_state.py", line 484, in call_callbacks
    self._new_widget_state.call_callback(wid)File "c:\users\91935\appdata\local\programs\python\python36\lib\site-packages\streamlit\state\session_state.py", line 228, in call_callback
    callback(*args, **kwargs)

This is my code:

from fpdf import FPDF

value = "abcd"

pdf = FPDF()
pdf.set_font("Arial", size = 15)
pdf.cell(200, 10, txt = "YouTube Summarizer", 
         ln = 1, align = 'C')
pdf.cell(200, 10, txt = value,
         ln = 2, align = 'C')

st.button('Download PDF', on_click= pdf.output("GFG.pdf"))