YaserDS-777 commited on
Commit
42a71b8
1 Parent(s): cdc1fda

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -3,10 +3,10 @@ import gradio as gr
3
  from transformers import pipeline
4
 
5
  # Get the Hugging Face API token from environment variables
6
- api_token = os.getenv("HUGGINGFACE_API_TOKEN")
7
 
8
  # Initialize the text generation pipeline with authentication
9
- pipe = pipeline("text-generation", model="meta-llama/Meta-Llama-3.1-405B", use_auth_token=api_token)
10
 
11
  # Define the function to generate text
12
  def generate_text(prompt):
 
3
  from transformers import pipeline
4
 
5
  # Get the Hugging Face API token from environment variables
6
+ HUGGINGFACE_API_TOKEN = os.getenv("HUGGINGFACE_API_TOKEN")
7
 
8
  # Initialize the text generation pipeline with authentication
9
+ pipe = pipeline("text-generation", model="meta-llama/Meta-Llama-3.1-405B", use_auth_token=HUGGINGFACE_API_TOKEN)
10
 
11
  # Define the function to generate text
12
  def generate_text(prompt):