Spaces:
Build error
Build error
Update app.py
Browse files11 unmodified lines121314151617188 unmodified lines2728293031323334353611 unmodified linesdoc_url = "https://www.twse.com.tw/pdf/ch/"+question+"_ch.pdf"doc_data = httpx.get(doc_url)if doc_data.status_code != 200:response = '查無股票代號!請輸入台灣上市櫃股票代號!'else:with tempfile.NamedTemporaryFile(suffix=".pdf", delete=False) as temp_file:temp_file.write(doc_data.content)8 unmodified linestemperature=0.3,)).textexcept:response = 'Gemini 回應出錯!請輸入台灣上市櫃股票代號!'return responsedescription = """請輸入台灣上市櫃股票代號!"""gr.close_all()11 unmodified lines121314151617188 unmodified lines2728293031323334353611 unmodified linesdoc_url = "https://www.twse.com.tw/pdf/ch/"+question+"_ch.pdf"doc_data = httpx.get(doc_url)if doc_data.status_code != 200:response = '查無股票代號!請輸入台灣上市股票代號!'else:with tempfile.NamedTemporaryFile(suffix=".pdf", delete=False) as temp_file:temp_file.write(doc_data.content)8 unmodified linestemperature=0.3,)).textexcept:response = 'Gemini 回應出錯!請輸入台灣上市股票代號!'return responsedescription = """請輸入台灣上市股票代號!"""gr.close_all()
app.py+3-3