sagacious-satadru commited on
Commit
132e9a7
1 Parent(s): 81f2b08

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -1,8 +1,10 @@
1
  import gradio as gr
 
 
2
 
3
  # Load the model from Hugging Face
4
  model_name = "comment-toxicity-analyzer/toxicity_det"
5
- api_key = "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"
6
  interface = gr.load(model_name, src="spaces", hf_api_key=api_key)
7
 
8
  def score_comment(comment):
 
1
  import gradio as gr
2
+ import os
3
+ api_key = os.getenv("SECRET_TOKEN")
4
 
5
  # Load the model from Hugging Face
6
  model_name = "comment-toxicity-analyzer/toxicity_det"
7
+
8
  interface = gr.load(model_name, src="spaces", hf_api_key=api_key)
9
 
10
  def score_comment(comment):