Skip to content
Snippets Groups Projects
Commit 2803e4e9 authored by Jan Eggers's avatar Jan Eggers
Browse files

V0.1.5 mit Parameter zum AIORNOT-Abschalten

parent 3b036e7a
No related branches found
No related tags found
No related merge requests found
......@@ -10,7 +10,7 @@ authors = [
maintainers = [
{name = "Jan Eggers", email = "jan.eggers@hr.de"},
]
version = "0.1.4.1" # Neue Versionsnummern für pip-Update
version = "0.1.5" # Neue Versionsnummern für pip-Update
description = "Bluesky-Konten auf KI-Inhalte checken"
requires-python = ">=3.8"
dependencies = [
......
No preview for this file type
......@@ -159,7 +159,7 @@ def fetch_user_posts(handle: str, limit: int = 100, cursor = None) -> list:
return posts[:limit]
def check_handle(handle:str, limit:int = 20, cursor = None):
def check_handle(handle:str, limit:int = 20, cursor = None, check_images = True):
# Konto und Anzahl der zu prüfenden Posts
if handle == '':
return None
......@@ -177,12 +177,14 @@ def check_handle(handle:str, limit:int = 20, cursor = None):
df = pd.DataFrame(posts)
# Now add probability check for each post text
print("Checke Texte:")
df['detectora_ai_score'] = df['text'].apply(detectora_wrapper)
if True:
print("Checke Texte:")
df['detectora_ai_score'] = df['text'].apply(detectora_wrapper)
# Now add "ai" or "human" assessment for images
print("\nChecke Bilder:")
df['aiornot_ai_score'] = df.apply(lambda row: aiornot_wrapper(row['author_did'], row['embed']), axis=1)
if check_images:
print("\nChecke Bilder:")
df['aiornot_ai_score'] = df.apply(lambda row: aiornot_wrapper(row['author_did'], row['embed']), axis=1)
print()
return df
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment