sultanDilawar commited on
Commit
991c4d0
·
verified ·
1 Parent(s): d22fbf1

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +23 -8
README.md CHANGED
@@ -2,29 +2,44 @@
2
  language: en
3
  license: mit
4
  tags:
5
- - react
6
- - redux
7
- - state management
8
  datasets:
9
- - sultanDilawar/react-redux-dataset
10
  base_model:
11
- - google-t5/t5-base
12
  ---
13
 
14
  # react-redux-model
15
 
16
- This is a custom model for understanding React and Redux concepts.
 
 
 
 
17
 
18
  ## Usage
19
 
20
- To use this model, send a POST request to the Hugging Face API:
21
 
22
  ```python
23
  import requests
24
 
 
25
  model_url = "https://api-inference.huggingface.co/models/sultanDilawar/react-redux-model"
 
 
26
  headers = {"Authorization": `Bearer ${HF_TOKEN}`}
 
 
27
  data = {"inputs": "What is Redux?"}
28
 
 
29
  response = requests.post(model_url, headers=headers, json=data)
30
- print(response.json())
 
 
 
 
 
 
2
  language: en
3
  license: mit
4
  tags:
5
+ - react
6
+ - redux
7
+ - state management
8
  datasets:
9
+ - sultanDilawar/react-redux-dataset
10
  base_model:
11
+ - google/t5-base
12
  ---
13
 
14
  # react-redux-model
15
 
16
+ This is a custom model for understanding React and Redux concepts. The model is trained to answer questions related to React and Redux.
17
+
18
+ ## Model Description
19
+
20
+ This model can be used for answering questions regarding React and Redux, such as their features, use cases, and concepts. It is specifically fine-tuned to answer React and Redux-related queries.
21
 
22
  ## Usage
23
 
24
+ To use this model, you can send a POST request to the Hugging Face API:
25
 
26
  ```python
27
  import requests
28
 
29
+ # Model URL (Hugging Face API URL)
30
  model_url = "https://api-inference.huggingface.co/models/sultanDilawar/react-redux-model"
31
+
32
+ # Authorization header with your Hugging Face API token
33
  headers = {"Authorization": `Bearer ${HF_TOKEN}`}
34
+
35
+ # Input data for question answering
36
  data = {"inputs": "What is Redux?"}
37
 
38
+ # Sending the request to Hugging Face API
39
  response = requests.post(model_url, headers=headers, json=data)
40
+
41
+ # Output the result
42
+ if response.status_code == 200:
43
+ print(response.json()) # This will give the answer
44
+ else:
45
+ print(f"Error {response.status_code}: {response.text}")