Chris4K commited on
Commit
cbbdd46
·
verified ·
1 Parent(s): 7755f96

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -1,4 +1,6 @@
1
  import streamlit as st
 
 
2
  #from transformers import BertModel, BertTokenizer
3
  from transformers import HfAgent, load_tool
4
 
@@ -72,7 +74,7 @@ class CustomHfAgent(Agent):
72
  """
73
 
74
  def __init__(
75
- self, url_endpoint, token=None, chat_prompt_template=None, run_prompt_template=None, additional_tools=None
76
  ):
77
  # super()._init_(self, url_endpoint, token=None, chat_prompt_template=None, run_prompt_template=None, additional_tools=None)
78
  self.url_endpoint = url_endpoint
 
1
  import streamlit as st
2
+ import secrets
3
+
4
  #from transformers import BertModel, BertTokenizer
5
  from transformers import HfAgent, load_tool
6
 
 
74
  """
75
 
76
  def __init__(
77
+ self, url_endpoint, token=secrets.HF_token, chat_prompt_template=None, run_prompt_template=None, additional_tools=None
78
  ):
79
  # super()._init_(self, url_endpoint, token=None, chat_prompt_template=None, run_prompt_template=None, additional_tools=None)
80
  self.url_endpoint = url_endpoint