Spaces:
Sleeping
Sleeping
Create app.py
Browse files
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 |
+
# })
|