Spaces:
Sleeping
Sleeping
| import os | |
| # This file is made to be able to locally test Gradio app. | |
| # In Huggingface Space, manually add the text in these files | |
| # to the Space's Secrets. Use same name as env vars here | |
| token_path = './secrets/openai_token.txt' | |
| with open(token_path, 'r') as f: | |
| os.environ['OPENAI_TOKEN'] = f.read() | |
| import app # import after setting env var so app sees latest version | |
| app.main() |