mirror of
https://github.com/believethehype/nostrdvm.git
synced 2025-11-18 14:57:02 +01:00
@@ -46,7 +46,7 @@ class ImageGenerationDALLE(DVMTaskInterface):
|
||||
model = "dall-e-3"
|
||||
quality = "standard"
|
||||
|
||||
for tag in event.tags():
|
||||
for tag in event.tags:
|
||||
if tag.as_vec()[0] == 'i':
|
||||
input_type = tag.as_vec()[2]
|
||||
if input_type == "text":
|
||||
|
||||
@@ -55,7 +55,7 @@ class ImageGenerationSDXL(DVMTaskInterface):
|
||||
lora_weight = ""
|
||||
strength = ""
|
||||
guidance_scale = ""
|
||||
for tag in event.tags():
|
||||
for tag in event.tags:
|
||||
if tag.as_vec()[0] == 'i':
|
||||
input_type = tag.as_vec()[2]
|
||||
if input_type == "text":
|
||||
|
||||
@@ -43,7 +43,7 @@ class TextExtractionPDF(DVMTaskInterface):
|
||||
input_content = ""
|
||||
url = ""
|
||||
|
||||
for tag in event.tags():
|
||||
for tag in event.tags:
|
||||
if tag.as_vec()[0] == 'i':
|
||||
input_type = tag.as_vec()[2]
|
||||
input_content = tag.as_vec()[1]
|
||||
|
||||
@@ -42,7 +42,7 @@ class Translation(DVMTaskInterface):
|
||||
text = ""
|
||||
translation_lang = "en"
|
||||
|
||||
for tag in event.tags():
|
||||
for tag in event.tags:
|
||||
if tag.as_vec()[0] == 'i':
|
||||
input_type = tag.as_vec()[2]
|
||||
|
||||
@@ -52,20 +52,20 @@ class Translation(DVMTaskInterface):
|
||||
translation_lang = str(tag.as_vec()[2]).split('-')[0]
|
||||
|
||||
if input_type == "event":
|
||||
for tag in event.tags():
|
||||
for tag in event.tags:
|
||||
if tag.as_vec()[0] == 'i':
|
||||
evt = get_event_by_id(tag.as_vec()[1], client=client, config=dvm_config)
|
||||
text = evt.content()
|
||||
break
|
||||
|
||||
elif input_type == "text":
|
||||
for tag in event.tags():
|
||||
for tag in event.tags:
|
||||
if tag.as_vec()[0] == 'i':
|
||||
text = tag.as_vec()[1]
|
||||
break
|
||||
|
||||
elif input_type == "job":
|
||||
for tag in event.tags():
|
||||
for tag in event.tags:
|
||||
if tag.as_vec()[0] == 'i':
|
||||
evt = get_referenced_event_by_id(event_id=tag.as_vec()[1], client=client,
|
||||
kinds=[EventDefinitions.KIND_NIP90_RESULT_EXTRACT_TEXT,
|
||||
|
||||
Reference in New Issue
Block a user