Spaces:
Runtime error
Runtime error
bramhampton
commited on
Commit
•
b17ac36
1
Parent(s):
3ae09ac
Basic demo
Browse files
app.py
ADDED
@@ -0,0 +1,13 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import streamlit as st
|
2 |
+
import requests
|
3 |
+
|
4 |
+
API_URL = "https://api-inference.huggingface.co/models/bramhampton/wp-gen"
|
5 |
+
headers = {"Authorization": "Bearer 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"}
|
6 |
+
|
7 |
+
def query(payload):
|
8 |
+
response = requests.post(API_URL, headers=headers, json=payload)
|
9 |
+
return response.json()
|
10 |
+
|
11 |
+
prompt = st.text_input("Please provide a starting point for your prompt")
|
12 |
+
prompt = query(prompt)
|
13 |
+
prompt
|