HankyStyle commited on
Commit
8e284c3
1 Parent(s): 0374ebd

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +0 -23
README.md CHANGED
@@ -46,29 +46,6 @@ QA_input = {
46
  }
47
  res = nlp(QA_input)
48
 
49
- # b) Load model & tokenizer
50
- tokenizer = BertTokenizerFast.from_pretrained(model_name)
51
- model = BertForQuestionAnswering.from_pretrained(model_name)
52
-
53
- # c) Load API
54
- import requests
55
-
56
- API_URL = "https://api-inference.huggingface.co/models/HankyStyle/Question-Answering-for-Argriculture"
57
- headers = {"Authorization": "Bearer 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"}
58
-
59
- def query(payload):
60
- response = requests.post(API_URL, headers=headers, json=payload)
61
- return response.json()
62
-
63
- output = query({
64
- "inputs": {
65
- "question": "哪一種植物在根據綜合主成分分析表明可以促進枯落葉養分釋放?",
66
- "context": "以黃土高原主要造林樹種落葉松(Larix principis-rupprechtii)及其他擬混雜的10個樹種為對象,採集當年枯落葉并以無林荒草地腐殖質層土壤作為分解介質,在室內將落葉松與其他樹種枯落葉單獨或以一定比例混合後裝入尼龍網袋並埋入盛土培養缽中,進行恒溫(20~25℃)恒濕(50%田間持水量)下連續345 d分解培養試驗。結果表明:枯落葉單獨分解時,大量元素整體上較微量元素容易釋出。除C和 N外,其他元素釋出速率與其初始含量無顯著相關關係(C為負相關,N正相關)。根據綜合主成分分析表明,與落葉松枯落葉混合分解總體上明顯促進養分釋放的樹種為白榆(Ulmus pumila)和油松(Pinus tabulaeformis),其次為白樺(Betula platyphylla);總體上明顯抑制養分釋放的樹種為側柏(Platycladus orientalis)和刺槐(Robinia pseudoacacia),其次為小葉楊(Populus simonii)。能夠促進枯落葉養分釋放的樹種將是選擇與落葉松混雜樹種時首先考慮的物種。"
67
- },
68
- })
69
- print(output)
70
-
71
-
72
  ```
73
 
74
  ## Authors
 
46
  }
47
  res = nlp(QA_input)
48
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
49
  ```
50
 
51
  ## Authors