K00B404 commited on
Commit
3ded572
·
verified ·
1 Parent(s): e0f4409

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -8
app.py CHANGED
@@ -14,20 +14,13 @@ from datetime import datetime
14
  token = os.getenv('HF_WRITE_TOKEN')
15
  blipper="Salesforce/blip-image-captioning-large"
16
  chatter="K00B404/transcript_image_generator"
 
17
 
18
  # Set your API endpoint and authorization details
19
  API_URL = "https://api-inference.huggingface.co/models/black-forest-labs/FLUX.1-schnell"
20
  headers = {"Authorization": f"Bearer {token}"} # Replace with your actual token
21
 
22
 
23
- from gradio_client import Client, file
24
-
25
- # Initialize the client for FLUX.1-Schnell-Serverless-enhanced
26
- flux_client = Client("K00B404/FLUX.1-Schnell-Serverless-enhanced")
27
-
28
-
29
- timeout = 60 # seconds
30
-
31
 
32
 
33
 
@@ -41,6 +34,14 @@ model = BlipForConditionalGeneration.from_pretrained(blipper)
41
  # Initialize the API client for the chatbot
42
  chatbot_client = Client(chatter)
43
 
 
 
 
 
 
 
 
 
44
  PROFILES_FILENAME = "character_profiles.json"
45
  REPO_ID = "K00B404/Persona_from_Image"
46
  REPO_TYPE = "space"
 
14
  token = os.getenv('HF_WRITE_TOKEN')
15
  blipper="Salesforce/blip-image-captioning-large"
16
  chatter="K00B404/transcript_image_generator"
17
+ fluxer = "K00B404/FLUX.1-Schnell-Serverless-enhanced"
18
 
19
  # Set your API endpoint and authorization details
20
  API_URL = "https://api-inference.huggingface.co/models/black-forest-labs/FLUX.1-schnell"
21
  headers = {"Authorization": f"Bearer {token}"} # Replace with your actual token
22
 
23
 
 
 
 
 
 
 
 
 
24
 
25
 
26
 
 
34
  # Initialize the API client for the chatbot
35
  chatbot_client = Client(chatter)
36
 
37
+ # Initialize the client for FLUX.1-Schnell-Serverless-enhanced
38
+ flux_client = Client(fluxer)
39
+
40
+
41
+ timeout = 60 # seconds
42
+
43
+
44
+
45
  PROFILES_FILENAME = "character_profiles.json"
46
  REPO_ID = "K00B404/Persona_from_Image"
47
  REPO_TYPE = "space"