Spaces:
Sleeping
Sleeping
Test starting InferenceAPI with key
Browse files
app.py
CHANGED
|
@@ -1,4 +1,10 @@
|
|
| 1 |
import streamlit as st
|
| 2 |
|
| 3 |
x = st.slider('Select a value')
|
| 4 |
-
st.write(x, 'squared is', x * x)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import streamlit as st
|
| 2 |
|
| 3 |
x = st.slider('Select a value')
|
| 4 |
+
st.write(x, 'squared is', x * x)
|
| 5 |
+
|
| 6 |
+
# Get the API key from the environment variable
|
| 7 |
+
api_key = st.secrets("InferenceKey")
|
| 8 |
+
|
| 9 |
+
# Initialize the Inference API with your model and API key
|
| 10 |
+
api = InferenceApi(repo_id="gpt-3", token=api_key)
|