Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -16,6 +16,10 @@ from torch import autocast
|
|
| 16 |
|
| 17 |
openai.api_key = os.getenv('openaikey')
|
| 18 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
def predict(input, manual_query_repacement, history=[]):
|
| 20 |
|
| 21 |
# gpt3
|
|
@@ -87,12 +91,3 @@ gr.Interface(fn=predict,
|
|
| 87 |
inputs=[inputText,manual_query,'state'],
|
| 88 |
|
| 89 |
outputs=["chatbot",'state', output_img]).launch()
|
| 90 |
-
|
| 91 |
-
|
| 92 |
-
|
| 93 |
-
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 94 |
-
pipe = StableDiffusionPipeline.from_pretrained("stale2000/sd-dnditem", torch_dtype=torch.float16)
|
| 95 |
-
pipe = pipe.to(device)
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
|
|
|
| 16 |
|
| 17 |
openai.api_key = os.getenv('openaikey')
|
| 18 |
|
| 19 |
+
device = "cuda" if torch.cuda.is_available() else "cpu"
|
| 20 |
+
pipe = StableDiffusionPipeline.from_pretrained("stale2000/sd-dnditem", torch_dtype=torch.float16)
|
| 21 |
+
pipe = pipe.to(device)
|
| 22 |
+
|
| 23 |
def predict(input, manual_query_repacement, history=[]):
|
| 24 |
|
| 25 |
# gpt3
|
|
|
|
| 91 |
inputs=[inputText,manual_query,'state'],
|
| 92 |
|
| 93 |
outputs=["chatbot",'state', output_img]).launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|