Rockramsri commited on
Commit
6f4ff9c
·
verified ·
1 Parent(s): e541f67
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -1,11 +1,12 @@
1
  from fastapi import FastAPI
2
  from transformers import pipeline
 
3
 
4
  ## create a new FASTAPI app instance
5
  app=FastAPI()
6
 
7
  # Initialize the text generation pipeline
8
- pipe = pipeline("text2text-generation", model="meta-llama/Meta-Llama-3.1-8B-Instruct",token=HF_KEY)
9
 
10
 
11
  @app.get("/")
 
1
  from fastapi import FastAPI
2
  from transformers import pipeline
3
+ import os
4
 
5
  ## create a new FASTAPI app instance
6
  app=FastAPI()
7
 
8
  # Initialize the text generation pipeline
9
+ pipe = pipeline("text2text-generation", model="meta-llama/Meta-Llama-3.1-8B-Instruct",token=os.getenv('HF_KEY'))
10
 
11
 
12
  @app.get("/")