KingZack commited on
Commit
6c8a60c
·
verified ·
1 Parent(s): 1875a1f

Create app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -0
app.py ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import requests
2
+ import streamlit
3
+
4
+ import os
5
+ HUGGINGFACEHUB_API_TOKEN = os.getenv("HUGGINGFACEHUB_API_TOKEN")
6
+
7
+ st.button("Reset", type="primary")
8
+ if st.button('Say hello'):
9
+ st.write('Why hello there')
10
+ else:
11
+ st.write('Goodbye')
12
+
13
+
14
+
15
+ # API_URL = "https://api-inference.huggingface.co/models/meta-llama/LlamaGuard-7b"
16
+ # headers = {"Authorization": "Bearer {HUGGINGFACEHUB_API_TOKEN}"}
17
+
18
+ # def query(payload):
19
+ # response = requests.post(API_URL, headers=headers, json=payload)
20
+ # return response.json()
21
+
22
+ # output = query({
23
+ # "inputs": "Can you please let us know more details about your ",
24
+ # })