Chris4K commited on
Commit
ac08f84
·
1 Parent(s): 18d3138

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -1,4 +1,7 @@
1
  import requests
 
 
 
2
 
3
  from fastapi import FastAPI
4
 
@@ -70,7 +73,7 @@ async def text_translation_api(text: str, target_language: str):
70
 
71
  ### ENd of Fast API endpoints
72
 
73
- api = HuggingFaceAPI( {hf_api_key} )
74
 
75
  # Define the function to be called when inputs are provided
76
  def hf_inference_translate(prompt="Wie kann ich Ihnen helfen?", target_language="en"):
 
1
  import requests
2
+ import os
3
+
4
+ os.environ["hf_api_key"] = hf_api_key
5
 
6
  from fastapi import FastAPI
7
 
 
73
 
74
  ### ENd of Fast API endpoints
75
 
76
+ api = HuggingFaceAPI( )
77
 
78
  # Define the function to be called when inputs are provided
79
  def hf_inference_translate(prompt="Wie kann ich Ihnen helfen?", target_language="en"):