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