Spaces:
Runtime error
Runtime error
update
Browse files- app.py +1 -1
- myturtle_cv.py +1 -1
app.py
CHANGED
|
@@ -224,7 +224,7 @@ def llm_call(question_prompt, model_name,
|
|
| 224 |
top_p=1, n_samples=64, stop=None):
|
| 225 |
if HUGGINGFACE:
|
| 226 |
model_inputs = hug_tokenizer([question_prompt], return_tensors="pt").to('cuda')
|
| 227 |
-
generated_ids = hug_model.generate(**model_inputs, max_length=1400, temperature=1, num_return_sequences=
|
| 228 |
responses = hug_tokenizer.batch_decode(generated_ids, skip_special_tokens=True)
|
| 229 |
codes = []
|
| 230 |
for response in responses:
|
|
|
|
| 224 |
top_p=1, n_samples=64, stop=None):
|
| 225 |
if HUGGINGFACE:
|
| 226 |
model_inputs = hug_tokenizer([question_prompt], return_tensors="pt").to('cuda')
|
| 227 |
+
generated_ids = hug_model.generate(**model_inputs, max_length=1400, temperature=1, num_return_sequences=9, do_sample=True)
|
| 228 |
responses = hug_tokenizer.batch_decode(generated_ids, skip_special_tokens=True)
|
| 229 |
codes = []
|
| 230 |
for response in responses:
|
myturtle_cv.py
CHANGED
|
@@ -25,7 +25,7 @@ def crop_and_scaled_imgs(imgs):
|
|
| 25 |
w = x_end - x
|
| 26 |
h = y_end - y
|
| 27 |
|
| 28 |
-
SIZE =
|
| 29 |
# Calculate the position to center the ROI in the SIZExSIZE image
|
| 30 |
start_x = max(0, (SIZE - w) // 2)
|
| 31 |
start_y = max(0, (SIZE - h) // 2)
|
|
|
|
| 25 |
w = x_end - x
|
| 26 |
h = y_end - y
|
| 27 |
|
| 28 |
+
SIZE = 300
|
| 29 |
# Calculate the position to center the ROI in the SIZExSIZE image
|
| 30 |
start_x = max(0, (SIZE - w) // 2)
|
| 31 |
start_y = max(0, (SIZE - h) // 2)
|