andreska's picture
Test starting InferenceAPI with key
2295d00 verified
raw
history blame
288 Bytes
import streamlit as st
x = st.slider('Select a value')
st.write(x, 'squared is', x * x)
# Get the API key from the environment variable
api_key = st.secrets("InferenceKey")
# Initialize the Inference API with your model and API key
api = InferenceApi(repo_id="gpt-3", token=api_key)