Brasd99 commited on
Commit
7509bae
1 Parent(s): 903851d

Added secrets

Browse files
Files changed (2) hide show
  1. app.py +2 -1
  2. config.json +1 -2
app.py CHANGED
@@ -4,6 +4,7 @@ import json
4
  import requests
5
  import gradio as gr
6
  import poe
 
7
 
8
  with open("config.json", "r") as f:
9
  config = json.load(f)
@@ -15,7 +16,7 @@ wait_time = config["WAIT_TIME"]
15
  chatgpt_url = config["CHATGPT_URL"]
16
  system_prompt = config["SYSTEM_PROMPT"]
17
  use_sage = config["USE_SAGE"]
18
- sage_token = config["SAGE_TOKEN"]
19
 
20
  client = poe.Client(sage_token)
21
 
 
4
  import requests
5
  import gradio as gr
6
  import poe
7
+ import os
8
 
9
  with open("config.json", "r") as f:
10
  config = json.load(f)
 
16
  chatgpt_url = config["CHATGPT_URL"]
17
  system_prompt = config["SYSTEM_PROMPT"]
18
  use_sage = config["USE_SAGE"]
19
+ sage_token = os.environ['SAGE_TOKEN']
20
 
21
  client = poe.Client(sage_token)
22
 
config.json CHANGED
@@ -1,10 +1,9 @@
1
  {
2
- "MAX_QUESTIONS_COUNT": 10,
3
  "MAX_TAGS_COUNT": 5,
4
  "MAX_ATTEMPS": 5,
5
  "WAIT_TIME": 1,
6
  "CHATGPT_URL": "https://free.churchless.tech/v1/chat/completions",
7
  "USE_SAGE": 1,
8
- "SAGE_TOKEN": "PGUXiyEZKRHcMoij9AjxXw%3D%3D",
9
  "SYSTEM_PROMPT": "Your task is to give the most detailed answer to the question posed. At the beginning of the question, there are tags in square brackets specifying the subject of the question. It is necessary to answer in the language of the user's question"
10
  }
 
1
  {
2
+ "MAX_QUESTIONS_COUNT": 20,
3
  "MAX_TAGS_COUNT": 5,
4
  "MAX_ATTEMPS": 5,
5
  "WAIT_TIME": 1,
6
  "CHATGPT_URL": "https://free.churchless.tech/v1/chat/completions",
7
  "USE_SAGE": 1,
 
8
  "SYSTEM_PROMPT": "Your task is to give the most detailed answer to the question posed. At the beginning of the question, there are tags in square brackets specifying the subject of the question. It is necessary to answer in the language of the user's question"
9
  }