Spaces:
Runtime error
Runtime error
import gradio as gr | |
import os | |
model = "meta-llama/Llama-2-13b-chat-hf" | |
API_URL = os.environ.get("API_URL") | |
BEARER_TOKEN = os.environ.get("BEARER_TOKEN") | |
import requests | |
headers = {"Authorization": BEARER_TOKEN } | |
def query(payload): | |
response = requests.post(API_URL, headers=headers, json=payload) | |
return response.json() | |
# output = query({ | |
# "inputs": "Can you please let us know more details about your ", | |
# }) | |
def greet(name): | |
return "Hello " + name + "!!" | |
iface = gr.Interface(fn=query, inputs="text", outputs="text") | |
iface.launch() |