Spaces:
Runtime error
Runtime error
| import gradio as gr | |
| from gradio_client import Client | |
| import json | |
| import os | |
| HF_TOKEN = os.environ.get("hfkey") | |
| credentials_json = os.environ.get("CREDENTIALS") | |
| if credentials_json is None: | |
| print("Error: Please set the CREDENTIALS") | |
| else: | |
| credentials = json.loads(credentials_json) | |
| gr.load(name="spaces/bentobytes/LawGPT", api_key=HF_TOKEN).launch(auth=credentials) | |
| # client = Client("bentobytes/LawGPT", hf_token=HF_TOKEN) | |
| # client = Client.duplicate("bentobytes/LawGPT", hf_token=HF_TOKEN) |