Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ Original file is located at
|
|
9 |
|
10 |
from huggingface_hub import login
|
11 |
|
12 |
-
login(token="
|
13 |
|
14 |
# Import necessary libraries
|
15 |
from transformers import MarianMTModel, MarianTokenizer, pipeline
|
@@ -44,7 +44,7 @@ import matplotlib.pyplot as plt
|
|
44 |
|
45 |
# API credentials and endpoint
|
46 |
API_URL = "https://api-inference.huggingface.co/models/black-forest-labs/FLUX.1-dev"
|
47 |
-
headers = {"Authorization": "Bearer
|
48 |
|
49 |
# Function to send payload and generate image
|
50 |
def generate_image(prompt):
|
|
|
9 |
|
10 |
from huggingface_hub import login
|
11 |
|
12 |
+
login(token="HF_TOKEN")
|
13 |
|
14 |
# Import necessary libraries
|
15 |
from transformers import MarianMTModel, MarianTokenizer, pipeline
|
|
|
44 |
|
45 |
# API credentials and endpoint
|
46 |
API_URL = "https://api-inference.huggingface.co/models/black-forest-labs/FLUX.1-dev"
|
47 |
+
headers = {"Authorization": "Bearer HF_TOKEN"}
|
48 |
|
49 |
# Function to send payload and generate image
|
50 |
def generate_image(prompt):
|