Callidior commited on
Commit
fae5c57
1 Parent(s): c9518d3

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import string
2
  import re
3
  import json
@@ -132,7 +133,7 @@ if __name__ == '__main__':
132
  print(f'Ready - running on GPU.')
133
  else:
134
  print(f'No GPU available - using hosted inference API.')
135
- predictor = HostedInference(model_path, num_titles=5)
136
 
137
  interface = create_gradio_ui(predictor)
138
  interface.launch()
 
1
+ import os
2
  import string
3
  import re
4
  import json
 
133
  print(f'Ready - running on GPU.')
134
  else:
135
  print(f'No GPU available - using hosted inference API.')
136
+ predictor = HostedInference(model_path, num_titles=5, api_key=os.environ.get("HF_TOKEN"))
137
 
138
  interface = create_gradio_ui(predictor)
139
  interface.launch()