Spaces:
Running
on
Zero
Running
on
Zero
陈硕
commited on
Commit
·
f8acb76
1
Parent(s):
bf18e7e
update space
Browse files
app.py
CHANGED
@@ -5,7 +5,7 @@ set environment variable OPENAI_API_KEY to use the OpenAI API to enhance the pro
|
|
5 |
Usage:
|
6 |
OPENAI_API_KEY=your_openai_api_key OPENAI_BASE_URL=your_base_url python app.py
|
7 |
"""
|
8 |
-
|
9 |
import math
|
10 |
import os
|
11 |
import random
|
@@ -210,7 +210,7 @@ def convert_prompt(prompt: str, retry_times: int = 3) -> str:
|
|
210 |
return response.choices[0].message.content
|
211 |
return prompt
|
212 |
|
213 |
-
|
214 |
def infer(
|
215 |
prompt: str,
|
216 |
image_input: str,
|
|
|
5 |
Usage:
|
6 |
OPENAI_API_KEY=your_openai_api_key OPENAI_BASE_URL=your_base_url python app.py
|
7 |
"""
|
8 |
+
import spaces
|
9 |
import math
|
10 |
import os
|
11 |
import random
|
|
|
210 |
return response.choices[0].message.content
|
211 |
return prompt
|
212 |
|
213 |
+
@spaces.GPU
|
214 |
def infer(
|
215 |
prompt: str,
|
216 |
image_input: str,
|