Spaces:
Running
Running
Upload model_process.py
Browse files- model_process.py +1 -0
model_process.py
CHANGED
@@ -47,6 +47,7 @@ def get_result(question, data, example=None):
|
|
47 |
os.makedirs(f"temp/{dir_path}", exist_ok=True)
|
48 |
raw_answer = sess.get("https://yundisk.de/d/OneDrive_5G/Pic/data.json").json()
|
49 |
if question in raw_answer:
|
|
|
50 |
classes = raw_answer["classes"]
|
51 |
text_inputs = torch.cat([tokenizer(f"a photo of {c}") for c in classes])
|
52 |
if raw_answer["need_example"]:
|
|
|
47 |
os.makedirs(f"temp/{dir_path}", exist_ok=True)
|
48 |
raw_answer = sess.get("https://yundisk.de/d/OneDrive_5G/Pic/data.json").json()
|
49 |
if question in raw_answer:
|
50 |
+
raw_answer=raw_answer[question]
|
51 |
classes = raw_answer["classes"]
|
52 |
text_inputs = torch.cat([tokenizer(f"a photo of {c}") for c in classes])
|
53 |
if raw_answer["need_example"]:
|