Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -23,13 +23,14 @@ from fastapi import FastAPI
|
|
23 |
|
24 |
app = FastAPI()
|
25 |
|
26 |
-
api_key = os.getenv("MISTRAL_KEY")
|
27 |
-
Mistralclient = Mistral(api_key=api_key)
|
28 |
|
29 |
API_TOKEN = os.getenv("HF_READ_TOKEN")
|
30 |
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
31 |
timeout = 100
|
32 |
|
|
|
|
|
|
|
33 |
def flip_image(x):
|
34 |
return np.fliplr(x)
|
35 |
|
@@ -161,17 +162,12 @@ def feifeichat(image):
|
|
161 |
|
162 |
css = """
|
163 |
footer{display:none !important}
|
164 |
-
|
165 |
-
max-width: 930px;
|
166 |
-
margin-left: auto;
|
167 |
-
margin-right: auto;
|
168 |
-
}
|
169 |
|
170 |
|
171 |
"""
|
172 |
with gr.Blocks(theme=theme, css=css, elem_id="app-container") as app:
|
173 |
gr.HTML("<center><h6>🎨 FLUX.1-Dev with LoRA 🇬🇧</h6></center>")
|
174 |
-
|
175 |
with gr.Tabs() as tabs:
|
176 |
with gr.TabItem(label="Image To Prompt", visible=True, id=1):
|
177 |
with gr.Row():
|
|
|
23 |
|
24 |
app = FastAPI()
|
25 |
|
|
|
|
|
26 |
|
27 |
API_TOKEN = os.getenv("HF_READ_TOKEN")
|
28 |
headers = {"Authorization": f"Bearer {API_TOKEN}"}
|
29 |
timeout = 100
|
30 |
|
31 |
+
api_key = os.getenv("MISTRAL_KEY")
|
32 |
+
Mistralclient = Mistral(api_key=api_key)
|
33 |
+
|
34 |
def flip_image(x):
|
35 |
return np.fliplr(x)
|
36 |
|
|
|
162 |
|
163 |
css = """
|
164 |
footer{display:none !important}
|
165 |
+
|
|
|
|
|
|
|
|
|
166 |
|
167 |
|
168 |
"""
|
169 |
with gr.Blocks(theme=theme, css=css, elem_id="app-container") as app:
|
170 |
gr.HTML("<center><h6>🎨 FLUX.1-Dev with LoRA 🇬🇧</h6></center>")
|
|
|
171 |
with gr.Tabs() as tabs:
|
172 |
with gr.TabItem(label="Image To Prompt", visible=True, id=1):
|
173 |
with gr.Row():
|