Parthebhan commited on
Commit
e114712
·
verified ·
1 Parent(s): 57c4edd

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -8
app.py CHANGED
@@ -2,20 +2,13 @@ from fastapi import FastAPI
2
  from transformers import pipeline
3
  from huggingface_hub import login
4
 
5
- huggingface-cli login
6
-
7
 
8
  ## create a new FASTAPI app instance
9
  app=FastAPI()
10
 
11
- import os
12
-
13
- api_key = os.getenv("HF_API_KEY")
14
- login(token=api_key)
15
-
16
 
17
  # Initialize the text generation pipeline
18
- pipe = pipeline("text-generation", model="meta-llama/Meta-Llama-3.1-8B")
19
 
20
 
21
  @app.get("/")
 
2
  from transformers import pipeline
3
  from huggingface_hub import login
4
 
 
 
5
 
6
  ## create a new FASTAPI app instance
7
  app=FastAPI()
8
 
 
 
 
 
 
9
 
10
  # Initialize the text generation pipeline
11
+ pipe = pipeline("text-generation", model="google/flan-t5-large")
12
 
13
 
14
  @app.get("/")