Respan Dataset Explorer

Select one behavior. Every returned turn has one binary label: Present or Absent. Source: final dense boolean release.

5,167,182physical rows
86shards
0.00%qualified row coverage
0.00%qualified cell coverage
Random row JSON API

turns-00053.parquet:1882

cd1d54409abfab04b357f611
turn 1/1o1-preview-2024-09-12GermanGermany4731 words
degenerate_repetitionAbsentFinal dense release
USER
mache ein gradio interface. in diesem interface sollte man eine pdf datei hochladen können. dann gibt es drei checkboxen mit den temperaturen. dabei sind 0.3, 0.7 und 1.0 standartmäßig an. 
Und man kann entweder den Titel und den Autoren selber eingeben oder man kann machen, mit einer checkbox das es von selber extrahiert wird. und dann mach eine textbox wo live die stichpunkte rein gemacht werden und eine textbox wo der inhalt reingestreamt wird.
und mach darunter textboxen. je nachdem was für temperaturen oben gecheckt wurden, gibt es bis zu drei und da werden die Gutachten angezeigt wenn sie generiert werden. 
mach auch, dass man ganz unten alle files downloaded kann, wie der inahlt der gemacht wurde, und die stichpunkte. und bitte auch dass die gutachten dort hertunterladen wurden. 
für das streamen und so ist hier noch documentation:


Checkbox

gradio.Checkbox(···)

Description
Creates a checkbox that can be set to True or False. Can be used as an input to pass a boolean value to a function or as an output to display a boolean value.
Behavior
As input component: Passes the status of the checkbox as a bool.
Your function should accept one of these types:

def predict(
	value: bool | None
)
	...


As output component: Expects a bool value that is set as the status of the checkbox
Your function should return one of these types:

def predict(···) -> bool | None
	...	
	return value

Initialization
Parameters

value: bool | Callable

label: str | None

info: str | None

every: Timer | float | None

inputs: Component | list[Component] | set[Component] | None

show_label: bool | None

container: bool

scale: int | None

min_width: int

interactive: bool | None

visible: bool

elem_id: str | None

elem_classes: list[str] | str | None

render: bool

key: int | str | None

Shortcuts
Class 	Interface String Shortcut 	Initialization

gradio.Checkbox
	

"checkbox"
	Uses default values
Demos
Event Listeners
Description

Event listeners allow you to respond to user interactions with the UI components you've defined in a Gradio Blocks app. When a user interacts with an element, such as changing a slider value or uploading an image, a function is called.
Supported Event Listeners

The Checkbox component supports the following event listeners. Each event listener takes the same parameters, which are listed in the Event Parameters table below.
Listener 	Description

Checkbox.change(fn, ···)
	

Triggered when the value of the Checkbox changes either because of user input (e.g. a user types in a textbox) OR because of a function update (e.g. an image receives a value from the output of an event trigger). See .input() for a listener that is only triggered by user input.

Checkbox.input(fn, ···)
	

This listener is triggered when the user changes the value of the Checkbox.

Checkbox.select(fn, ···)
	

Event listener for when the user selects or deselects the Checkbox. Uses event data gradio.SelectData to carry value referring to the label of the Checkbox, and selected to refer to state of the Checkbox. See EventData documentation on how to use this event data
Event Parameters
Parameters

fn: Callable | None | Literal['decorator']

inputs: Component | BlockContext | list[Component | BlockContext] | Set[Component | BlockContext] | None

outputs: Component | BlockContext | list[Component | BlockContext] | Set[Component | BlockContext] | None

api_name: str | None | Literal[False]

scroll_to_output: bool

show_progress: Literal['full', 'minimal', 'hidden']

queue: bool

batch: bool

max_batch_size: int

preprocess: bool

postprocess: bool

cancels: dict[str, Any] | list[dict[str, Any]] | None

trigger_mode: Literal['once', 'multiple', 'always_last'] | None

js: str | None

concurrency_limit: int | None | Literal['default']

concurrency_id: str | None

show_api: bool

time_limit: int | None

stream_every: float

like_user_message: bool






Textbox

gradio.Textbox(···)

Description
Creates a textarea for user to enter string input or display string output.
Behavior
As input component: Passes text value as a str into the function.
Your function should accept one of these types:

def predict(
	value: str | None
)
	...


As output component: Expects a str returned from function and sets textarea value to it.
Your function should return one of these types:

def predict(···) -> str | None
	...	
	return value

Initialization
Parameters

value: str | Callable | None

lines: int

max_lines: int

placeholder: str | None

label: str | None

info: str | None

every: Timer | float | None

inputs: Component | list[Component] | set[Component] | None

show_label: bool | None

container: bool

scale: int | None

min_width: int

interactive: bool | None

visible: bool

elem_id: str | None

autofocus: bool

autoscroll: bool

elem_classes: list[str] | str | None

render: bool

key: int | str | None

type: Literal['text', 'password', 'email']

text_align: Literal['left', 'right'] | None

rtl: bool

show_copy_button: bool

max_length: int | None

submit_btn: str | bool | None

stop_btn: str | bool | None

Shortcuts
Class 	Interface String Shortcut 	Initialization

gradio.Textbox
	

"textbox"
	Uses default values

gradio.TextArea
	

"textarea"
	Uses lines=7
Demos
Event Listeners
Description

Event listeners allow you to respond to user interactions with the UI components you've defined in a Gradio Blocks app. When a user interacts with an element, such as changing a slider value or uploading an image, a function is called.
Supported Event Listeners

The Textbox component supports the following event listeners. Each event listener takes the same parameters, which are listed in the Event Parameters table below.
Listener 	Description

Textbox.change(fn, ···)
	

Triggered when the value of the Textbox changes either because of user input (e.g. a user types in a textbox) OR because of a function update (e.g. an image receives a value from the output of an event trigger). See .input() for a listener that is only triggered by user input.

Textbox.input(fn, ···)
	

This listener is triggered when the user changes the value of the Textbox.

Textbox.select(fn, ···)
	

Event listener for when the user selects or deselects the Textbox. Uses event data gradio.SelectData to carry value referring to the label of the Textbox, and selected to refer to state of the Textbox. See EventData documentation on how to use this event data

Textbox.submit(fn, ···)
	

This listener is triggered when the user presses the Enter key while the Textbox is focused.

Textbox.focus(fn, ···)
	

This listener is triggered when the Textbox is focused.

Textbox.blur(fn, ···)
	

This listener is triggered when the Textbox is unfocused/blurred.

Textbox.stop(fn, ···)
	

This listener is triggered when the user reaches the end of the media playing in the Textbox.
Event Parameters
Parameters

fn: Callable | None | Literal['decorator']

inputs: Component | BlockContext | list[Component | BlockContext] | Set[Component | BlockContext] | None

outputs: Component | BlockContext | list[Component | BlockContext] | Set[Component | BlockContext] | None

api_name: str | None | Literal[False]

scroll_to_output: bool

show_progress: Literal['full', 'minimal', 'hidden']

queue: bool

batch: bool

max_batch_size: int

preprocess: bool

postprocess: bool

cancels: dict[str, Any] | list[dict[str, Any]] | None

trigger_mode: Literal['once', 'multiple', 'always_last'] | None

js: str | None

concurrency_limit: int | None | Literal['default']

concurrency_id: str | None

show_api: bool

time_limit: int | None

stream_every: float

like_user_message: bool





Streaming outputs

In some cases, you may want to stream a sequence of outputs rather than show a single output at once. For example, you might have an image generation model and you want to show the image that is generated at each step, leading up to the final image. Or you might have a chatbot which streams its response one token at a time instead of returning it all at once.

In such cases, you can supply a generator function into Gradio instead of a regular function. Creating generators in Python is very simple: instead of a single return value, a function should yield a series of values instead. Usually the yield statement is put in some kind of loop. Here's an example of an generator that simply counts up to a given number:

def my_generator(x):
    for i in range(x):
        yield i

You supply a generator into Gradio the same way as you would a regular function. For example, here's a a (fake) image generation model that generates noise for several steps before outputting an image using the gr.Interface class:

import gradio as gr
import numpy as np
import time

def fake_diffusion(steps):
    rng = np.random.default_rng()
    for i in range(steps):
        time.sleep(1)
        image = rng.random(size=(600, 600, 3))
        yield image
    image = np.ones((1000,1000,3), np.uint8)
    image[:] = [255, 124, 0]
    yield image

demo = gr.Interface(fake_diffusion,
                    inputs=gr.Slider(1, 10, 3, step=1),
                    outputs="image")

demo.launch()

steps
1
10
output

gradio/fake_diffusion built with Gradio. Hosted on Hugging Face Space Spaces

Note that we've added a time.sleep(1) in the iterator to create an artificial pause between steps so that you are able to observe the steps of the iterator (in a real image generation model, this probably wouldn't be necessary).

Similarly, Gradio can handle streaming inputs, e.g. an image generation model that reruns every time a user types a letter in a textbox. This is covered in more details in our guide on building reactive Interfaces.
Streaming Media

Gradio can stream audio and video directly from your generator function. This lets your user hear your audio or see your video nearly as soon as it's yielded by your function. All you have to do is

    Set streaming=True in your gr.Audio or gr.Video output component.
    Write a python generator that yields the next "chunk" of audio or video.
    Set autoplay=True so that the media starts playing automatically.

For audio, the next "chunk" can be either an .mp3 or .wav file or a bytes sequence of audio. For video, the next "chunk" has to be either .mp4 file or a file with h.264 codec with a .ts extension. For smooth playback, make sure chunks are consistent lengths and larger than 1 second.

We'll finish with some simple examples illustrating these points.
Streaming Audio

import gradio as gr
from time import sleep

def keep_repeating(audio_file):
    for _ in range(10):
        sleep(0.5)
        yield audio_file

gr.Interface(keep_repeating,
             gr.Audio(sources=["microphone"], type="filepath"),
             gr.Audio(streaming=True, autoplay=True)
).launch()

Streaming Video

import gradio as gr
from time import sleep

def keep_repeating(video_file):
    for _ in range(10):
        sleep(0.5)
        yield video_file

gr.Interface(keep_repeating,
             gr.Video(sources=["webcam"], format="mp4"),
             gr.Video(streaming=True, autoplay=True)
).launch()

End-to-End Examples

For an end-to-end example of streaming media, see the object detection from video guide or the streaming AI-generated audio with transformers guide.






und hier ist der code:
# analyse_dissertation.py

import os
import ollama
import PyPDF2
import textwrap
import sys
import io
import re
import time

# Konfiguriere sys.stdout auf UTF-8
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')

def extract_text_from_pdf(pdf_path):
    """
    Extrahiert den gesamten Text aus einer PDF-Datei.
    """
    pdf_reader = PyPDF2.PdfReader(pdf_path)
    text = ""
    for page_num in range(len(pdf_reader.pages)):
        page = pdf_reader.pages[page_num]
        text += page.extract_text()
    return text

def extract_text_from_pages(pdf_path, start_page, end_page):
    """
    Extrahiert den Text aus spezifischen Seiten einer PDF-Datei.
    """
    pdf_reader = PyPDF2.PdfReader(pdf_path)
    text = ""
    for page_num in range(start_page, end_page + 1):
        page = pdf_reader.pages[page_num]
        text += page.extract_text()
    return text

def split_text_into_chunks(text, max_length=60000):
    """
    Teilt den Text in Abschnitte mit maximaler Länge.
    """
    return textwrap.wrap(text, max_length)

def create_chapter_prompt(text_chunk):
    """
    Erstellt den Eingabeprompt für das Kapitel-LLM basierend auf dem Seitenbereich.
    """
    system_prompt = """
Du bist ein KI-Assistent, der die Hauptkapitelüberschriften einer Dissertation aus einem gegebenen Textabschnitt extrahiert.

Anweisungen:

- **Identifiziere die Hauptkapitel und ihre Überschriften** aus dem bereitgestellten Textabschnitt.
- **Gib nur die Kapitelüberschriften in ihrer genauen Formulierung und Reihenfolge wieder, wie sie im Text vorkommen.**
- **Füge keine zusätzlichen Informationen hinzu und ändere keine bestehenden.**
- Antworte nur mit der Liste der Kapitelüberschriften, ohne zusätzliche Kommentare oder Einleitungen.

**Erwartetes Format:**

1. Kapitel 1 Überschrift
2. Kapitel 2 Überschrift
3. Kapitel 3 Überschrift
"""
    user_prompt = f"""
**Textabschnitt:**

{text_chunk}

**Kapitelüberschriften:**
"""
    return system_prompt, user_prompt

def create_analysis_prompt(text_chunk):
    """
    Erstellt den Eingabeprompt für das Analyse-LLM basierend auf dem Textabschnitt.
    """
    system_prompt = """
Du bist ein KI-Assistent, der eine Dissertation analysiert. Deine Aufgabe ist es, die bestehenden Stichpunkte basierend auf dem neuen Textabschnitt zu überarbeiten und zu ergänzen.

Es ist **zwingend erforderlich**, dass du die folgenden Hauptaspekte **exakt** beibehältst und **keine** weiteren Hauptaspekte hinzufügst oder die Reihenfolge änderst:

**Hauptaspekte (verwende exakt diese Überschriften):**
1. Einordnung und Zielsetzung der Arbeit
2. Bewertung der Arbeit
3. Wichtige Notizen fürs Gutachten

**Anweisungen**:

- **Lese den bereitgestellten Textabschnitt sorgfältig und extrahiere alle relevanten Informationen.**
- Aktualisiere die Stichpunkte unter jedem Hauptaspekt basierend auf dem neuen Text.
- **Ergänzen:** Füge neue relevante Informationen hinzu, die im Textabschnitt vorkommen und noch nicht in den Stichpunkten enthalten sind.
- **Überarbeiten:** Aktualisiere bestehende Stichpunkte, wenn der neue Text detailliertere oder korrigierende Informationen bereitstellt.
- **Löschen:** Entferne unwichtige oder nicht mehr zutreffende Informationen.
- Verwende Unterstichpunkte (mit "-" oder "•"), um detaillierte Informationen zu strukturieren.
- **Vermeide Redundanzen und Wiederholungen.**
- **Übersehe keine wichtigen Informationen.**
- **Du darfst keine neuen Hauptaspekte hinzufügen, die vorhandenen nicht umbenennen oder deren Reihenfolge ändern.**
- **Behalte die Reihenfolge und die genaue Schreibweise der Hauptaspekte bei.**
- **Verwende ausschließlich die drei vorgegebenen Hauptaspekte.**
- **Antworte NUR mit den aktualisierten Stichpunkten im angegebenen Format, ohne zusätzliche Überschriften, Kommentare oder Einleitungen.**
- **Wenn du versehentlich neue Hauptaspekte hinzugefügt hast, entschuldige dich nicht, sondern beginne sofort von vorne und befolge die Anweisungen genau.**
"""
    user_prompt = f"""
**Bisherige Stichpunkte:**

{{previous_bullet_points}}

**Textabschnitt:**

{text_chunk}

**Aktualisierte Stichpunkte:**
"""
    return system_prompt, user_prompt

def create_content_prompt(text_chunk):
    """
    Erstellt den Eingabeprompt für das Inhalts-LLM basierend auf dem Textabschnitt.
    """
    system_prompt = """
Du bist ein KI-Assistent, der den Inhalt einer Dissertation zusammenfasst. Deine Aufgabe ist es, den bereitgestellten Textabschnitt in **detaillierten und logisch strukturierten Stichpunkten** darzustellen.

**Anweisungen**:

- **Erstelle detaillierte und logische Stichpunkte, die den Inhalt des Textabschnitts umfassend zusammenfassen.**
- **Ordne die Informationen sinnvoll und thematisch passend an.**
- Verwende Unterstichpunkte, um Details zu strukturieren.
- **Vermeide Redundanzen und Wiederholungen.**
- **Du darfst keine Kapitelüberschriften hinzufügen oder verwenden.**
- **Füge keine zusätzlichen Kommentare, Überschriften oder Hinweise hinzu.**
- Antworte nur mit den Stichpunkten.
"""
    user_prompt = f"""
**Textabschnitt:**

{text_chunk}

**Stichpunkte:**
"""
    return system_prompt, user_prompt

def create_summary_prompt(long_bullet_points):
    """
    Erstellt den Eingabeprompt, um die Stichpunkte zu kürzen, falls sie zu lang sind.
    """
    system_prompt = """
Du bist ein KI-Assistent, der eine Liste von Stichpunkten zusammenfasst, um sie kürzer zu gestalten, während die wichtigsten Informationen erhalten bleiben.

**Anweisungen**:

- **Fasse die bereitgestellten Stichpunkte so zusammen, dass die Gesamtanzahl der Zeichen deutlich reduziert wird (idealerweise unter 10.000 Zeichen).**
- **Erhalte die wichtigsten Punkte und Informationen aus den ursprünglichen Stichpunkten.**
- **Ordne die Informationen logisch und thematisch passend an.**
- Verwende weiterhin Stichpunkte, ggf. mit Unterstichpunkten.
- **Vermeide Redundanzen und Wiederholungen.**
- **Füge keine neuen Informationen hinzu.**
- Antworte nur mit den gekürzten Stichpunkten.
"""
    user_prompt = f"""
**Ursprüngliche Stichpunkte:**

{long_bullet_points}

**Gekürzte Stichpunkte:**
"""
    return system_prompt, user_prompt

def create_title_author_prompt(text_chunk):
    """
    Erstellt den Eingabeprompt, um den Titel und die Autoren aus dem Textabschnitt zu extrahieren.
    """
    system_prompt = """
Du bist ein KI-Assistent, der den Titel und die Autoren einer wissenschaftlichen Arbeit aus einem Textauszug extrahiert.

**Anweisungen**:

- **Identifiziere den genauen Titel der Arbeit.**
- **Identifiziere den oder die Autoren der Arbeit.**
- **Gib den Titel und die Autoren getrennt an.**
- **Füge keine zusätzlichen Informationen hinzu.**
- Antworte nur mit den folgenden Überschriften und ihren Inhalten:

Titel:
[Der genaue Titel der Arbeit]

Autoren:
[Name des Autors oder der Autoren]
"""
    user_prompt = f"""
**Textauszug:**

{text_chunk}

**Titel und Autoren:**
"""
    return system_prompt, user_prompt

def analyze_text_with_ollama(system_prompt, user_prompt, max_retries=7, num_predict=512, analytics_check=False, model_name='llama3.1-64k', temperature=0.3):
    """
    Verwendet Ollama, um den Prompt zu analysieren und die Ausgabe zu streamen.
    Wenn analytics_check=True, wird geprüft, ob zusätzliche Hauptaspekte eingefügt wurden.
    """
    for attempt in range(max_retries):
        response = ""
        print(f"\nVersuch {attempt + 1} von {max_retries}")
        stream = ollama.generate(
            model=model_name,
            prompt=system_prompt + user_prompt,
            options={
                'temperature': temperature,
                'num_predict': num_predict,
            },
            stream=True,
        )
        for chunk in stream:
            content = chunk['response']
            response += content
            # Ausgabe direkt anzeigen
            print(content, end='', flush=True)
        if response.strip() != "":
            # Wenn analytics_check aktiviert ist, prüfen wir auf zusätzliche Hauptaspekte
            if analytics_check:
                if check_for_additional_main_aspects(response):
                    print("\n\n[Warnung] Zusätzliche Hauptaspekte erkannt. Analyse wird erneut durchgeführt...\n")
                    time.sleep(1)  # Kurze Pause vor dem erneuten Start
                    continue  # Erneute Analyse
                else:
                    return response.strip()  # Erfolgreiche Generierung
            else:
                return response.strip()  # Erfolgreiche Generierung ohne Prüfung
        else:
            print("\n\n[Warnung] Keine Ausgabe erhalten. Generierung wird neu gestartet...\n")
            time.sleep(1)  # Kurze Pause vor dem erneuten Start
    print("\n[Fehler] Maximalanzahl der Wiederholungen erreicht. Generierung wird abgebrochen.\n")
    return response.strip()  # Gibt die letzte Antwort zurück

def check_for_additional_main_aspects(response_text):
    """
    Prüft, ob die Antwort zusätzliche Hauptaspekte enthält.
    Gibt True zurück, wenn zusätzliche Hauptaspekte gefunden wurden, ansonsten False.
    """
    # Definiere die erlaubten Hauptaspekte (ohne führende Leerzeichen)
    allowed_main_aspects = [
        "1. Einordnung und Zielsetzung der Arbeit",
        "2. Bewertung der Arbeit",
        "3. Wichtige Notizen fürs Gutachten"
    ]

    # Normalisiere die Antwort, entferne führende/trailing Whitespaces
    normalized_response = response_text.strip()

    # Suche nach Hauptaspekten (Überschriften), die mit einer Zahl beginnen
    main_aspects_in_response = re.findall(r'^\**\s*\d+\. .+', normalized_response, re.MULTILINE)

    # Prüfe, ob irgendwelche Hauptaspekte nicht in der erlaubten Liste sind
    for aspect in main_aspects_in_response:
        # Entferne führende Sterne und Leerzeichen
        aspect_clean = aspect.lstrip('*').strip()
        if aspect_clean not in allowed_main_aspects:
            return True  # Ein zusätzlicher Hauptaspekt wurde erkannt
    return False  # Keine zusätzlichen Hauptaspekte erkannt

def generate_gutachten(bullet_points, main_chapters, temperature, filename, title, authors):
    """
    Verwendet das LLM, um basierend auf den Stichpunkten ein ausführliches und detailliertes Gutachten zu erstellen.
    Liest 'BeispielGutachten.txt' ein und stellt es als Referenz zur Verfügung, um Stil und wissenschaftlichen Standard zu vermitteln.
    Verwendet den extrahierten Titel und die Autoren im Prompt.
    Speichert zusätzlich den vollständigen Prompt in einer TXT-Datei.
    """
    # Erstelle eine Liste der Kapitelüberschriften für den Prompt
    chapters_formatted = "\n".join([f"- {chapter}" for chapter in main_chapters])

    # Lese das Beispielgutachten ein
    beispielgutachten_path = 'BeispielGutachten.txt'
    with open(beispielgutachten_path, 'r', encoding='utf-8') as f:
        beispielgutachten_text = f.read()

    # Formatiere die Autoren
    if isinstance(authors, list):
        authors_formatted = ", ".join(authors)
    else:
        authors_formatted = authors

    system_prompt = f"""
Du bist ein erfahrener Gutachter für Dissertationen im Bereich der Maschinenbau- und Fertigungstechnik. Deine Aufgabe ist es, basierend auf den bereitgestellten Stichpunkten ein **ausführliches und detailliertes Gutachten** zur Dissertation von {authors_formatted} mit dem Titel "{title}" zu schreiben.

Das Gutachten muss die folgende Struktur haben und darf **ausschließlich** diese Hauptaspekte enthalten:

1. Einordnung und Zielsetzung der Arbeit
2. Inhalt der Arbeit
3. Bewertung der Arbeit

Zur Orientierung bezüglich Stil und wissenschaftlichem Standard findest du im Folgenden ein Beispielgutachten. **Wichtig:** Verwende keine spezifischen Inhalte oder Kontexte aus dem Beispielgutachten. Nutze es lediglich, um den gewünschten Stil und wissenschaftlichen Standard zu verstehen.

**Beispielgutachten:**

{beispielgutachten_text}

**Anweisungen**:

- **Geh in jedem Abschnitt sehr ausführlich auf die Details ein. Verwende alle bereitgestellten Stichpunkte und Unterstichpunkte und erweitere sie zu fließendem Text.**
- **Im Abschnitt "Inhalt der Arbeit" beschreibst du jedes Kapitel der Dissertation detailliert, basierend auf den Stichpunkten und den folgenden Kapitelüberschriften:**
{chapters_formatted}
- **Formuliere den Inhalt im Fließtext aus, du musst dabei detailliert auf die Kapitel und deren Unterstichpunkte eingehen.**
- **Verwende klare und präzise Sprache, um die Qualität der Arbeit widerzuspiegeln.**
- **Vermeide Redundanzen und Wiederholungen.**
- Formuliere das Gutachten in fließendem Text.
- Verwende eine formelle und akademische Sprache.
- Integriere die Stichpunkte logisch und kohärent in den Text.
- **Füge keine zusätzlichen Aspekte, Themen oder persönlichen Meinungen hinzu, die nicht in den Stichpunkten enthalten sind.**
- **Behalte die Reihenfolge und die genaue Schreibweise der Hauptaspekte bei.**
- **Beginne jeden Abschnitt mit der entsprechenden Überschrift.**
- **Schließe das Gutachten mit einer klaren Empfehlung zur Annahme der Dissertation ab und gib eine Notenvergabe gemäß der Promotionsordnung an (z.B. "Ich bewerte die Arbeit mit der Note 1,3 (magna cum laude)").**
- **Antworte NUR mit dem Gutachten im angegebenen Format, ohne zusätzliche Überschriften, Kommentare oder Einleitungen.**
- **Verwende ausschließlich die drei vorgegebenen Hauptaspekte und füge keine weiteren hinzu.**
"""

    user_prompt = f"""
**Stichpunkte:**

{bullet_points}


Das Gutachten sollte lang und detailliert sowie auf einem hohen wissenschaftlichen Standard verfasst sein.

**Gutachten:**
"""

    full_prompt = system_prompt + user_prompt  # Vollständiger Prompt

    response = ""
    print(f"\n---- Generiere das Gutachten mit Temperature {temperature} ----\n")
    # Verwende das Modell 'llama3.1-128k' für das Gutachten
    response = analyze_text_with_ollama(
        system_prompt,
        user_prompt,
        max_retries=7,  # Erhöht auf 7 Versuche
        num_predict=16000,  # Erhöht für längere Ausgaben
        analytics_check=False,  # Keine Formatprüfung beim Gutachten
        model_name='llama3.1-128k',  # Verwende das 128k-Modell hier
        temperature=temperature,  # Verwende die angegebene Temperatur
    )
    # Gutachten speichern
    output_folder = 'gutachten_output'
    os.makedirs(output_folder, exist_ok=True)
    output_path = os.path.join(output_folder, filename)
    with open(output_path, 'w', encoding='utf-8') as f:
        f.write(response)

    # Vollständigen Prompt speichern
    prompt_output_path = os.path.join(output_folder, f'gutachten_prompt_{temperature}.txt')
    with open(prompt_output_path, 'w', encoding='utf-8') as f:
        f.write(full_prompt)

    return response

def extract_title_and_authors(pdf_path):
    """
    Extrahiert den Titel und die Autoren aus den ersten drei Seiten der PDF-Datei.
    """
    text = extract_text_from_pages(pdf_path, 0, 2)  # Seiten 1 bis 3 (0-basiert)

    # Erstelle den Prompt für das LLM
    system_prompt, user_prompt = create_title_author_prompt(text)
    response = analyze_text_with_ollama(
        system_prompt,
        user_prompt,
        max_retries=7,
        num_predict=500,
        analytics_check=False,
        model_name='llama3.1-64k',
    )

    # Extrahiere Titel und Autoren aus der Antwort
    title_match = re.search(r'Titel:\s*(.+)', response)
    authors_match = re.search(r'Autoren?:\s*(.+)', response)

    title = title_match.group(1).strip() if title_match else "Titel nicht gefunden"
    authors = authors_match.group(1).strip() if authors_match else "Autor(en) nicht gefunden"

    # Falls mehrere Autoren durch Kommas getrennt sind, in eine Liste umwandeln
    if ',' in authors:
        authors = [author.strip() for author in authors.split(',')]

    print(f"\nExtrahierter Titel: {title}")
    print(f"Extrahierte(r) Autor(en): {authors}")

    return title, authors

def main():
    pdf_path = 'dissertation1.pdf'  # Pfad zur PDF-Datei

    # Extrahiere den Titel und die Autoren
    print("\n---- Extrahiere Titel und Autoren ----\n")
    title, authors = extract_title_and_authors(pdf_path)

    # Extrahiere die Seiten 2 bis 6 für die Kapitel-LLM (Hinweis: Seitenzahlen sind 0-basiert)
    chapter_text = extract_text_from_pages(pdf_path, 1, 5)  # Seiten 2 bis 6

    # Kapitel-LLM einsetzen, um die Hauptkapitel herauszuarbeiten
    print("\n---- Extrahiere Hauptkapitel ----\n")
    system_prompt, user_prompt = create_chapter_prompt(chapter_text)
    main_chapters_raw = analyze_text_with_ollama(
        system_prompt,
        user_prompt,
        max_retries=7,  # Erhöht auf 7 Versuche
        num_predict=1024,  # Erhöht für längere Ausgaben
        analytics_check=False,  # Keine Formatprüfung hier
        model_name='llama3.1-64k',  # Verwende das 64k-Modell hier
    )

    # Verarbeite die Ausgabe zu einer Liste von Kapiteln
    main_chapters = [chapter.strip() for chapter in main_chapters_raw.strip().split('\n') if chapter.strip()]

    print("\nExtrahierte Hauptkapitel:")
    for chapter in main_chapters:
        print(chapter)

    # Gesamten Text extrahieren
    full_text = extract_text_from_pdf(pdf_path)
    text_chunks = split_text_into_chunks(full_text, max_length=15000)

    # Initiale Stichpunkte für die Analyse-LLM mit der vorgegebenen Struktur
    analysis_bullet_points = """1. Einordnung und Zielsetzung der Arbeit

2. Bewertung der Arbeit

3. Wichtige Notizen fürs Gutachten
"""

    # Liste zum Speichern der individuellen Inhalts-Stichpunkte
    content_bullet_points_list = []

    for i, chunk in enumerate(text_chunks):
        print(f"\n---- Analyse Abschnitt {i+1} ----\n")

        # Analyse-LLM
        print("\n-- Analyse LLM --\n")
        system_prompt, user_prompt = create_analysis_prompt(chunk)
        # Füge die bisherigen Stichpunkte in den User-Prompt ein
        user_prompt = user_prompt.format(previous_bullet_points=analysis_bullet_points)
        new_analysis_bullet_points = analyze_text_with_ollama(
            system_prompt,
            user_prompt,
            max_retries=7,  # Erhöht auf 7 Versuche
            num_predict=1500,  # Erhöht für längere Ausgaben
            analytics_check=True,  # Formatprüfung aktivieren
            model_name='llama3.1-64k',  # Verwende das 64k-Modell hier
        )
        analysis_bullet_points = new_analysis_bullet_points  # Aktualisiere die Stichpunkte für die nächste Iteration

        # Inhalts-LLM
        print("\n-- Inhalts LLM --\n")
        system_prompt, user_prompt = create_content_prompt(chunk)
        content_output = analyze_text_with_ollama(
            system_prompt,
            user_prompt,
            max_retries=7,  # Erhöht auf 7 Versuche
            num_predict=1500,  # Erhöht für längere Ausgaben
            analytics_check=False,  # Keine Formatprüfung beim Inhalts-LLM
            model_name='llama3.1-64k',  # Verwende das 64k-Modell hier
        )
        # Füge die individuellen Inhalts-Stichpunkte der Liste hinzu
        content_bullet_points_list.append(content_output.strip())

    # Am Ende alle Stichpunkte kombinieren
    print("\n---- Finale Zusammenfassung der Stichpunkte ----\n")
    combined_bullet_points = analysis_bullet_points.strip()

    # Füge die Inhalts-Stichpunkte hinzu
    combined_bullet_points += "\n\n**Inhaltszusammenfassung:**\n\n"
    # Kombiniere alle individuellen Inhalts-Stichpunkte
    combined_content_bullet_points = '\n\n'.join(content_bullet_points_list)

    # Prüfe, ob die Inhalts-Stichpunkte zu lang sind
    if len(combined_content_bullet_points) > 10000:
        print("\n[Info] Die Inhalts-Stichpunkte sind länger als 10.000 Zeichen und werden zusammengefasst.\n")
        system_prompt, user_prompt = create_summary_prompt(combined_content_bullet_points)
        combined_content_bullet_points = analyze_text_with_ollama(
            system_prompt,
            user_prompt,
            max_retries=7,
            num_predict=5000,
            analytics_check=False,
            model_name='llama3.1-64k',  # Modell für die Zusammenfassung
        )

    combined_bullet_points += combined_content_bullet_points

    # Ausgabe der kombinierten Stichpunkte
    print(combined_bullet_points)

    # Speichern der Analyse-Stichpunkte
    output_folder = 'gutachten_output'
    os.makedirs(output_folder, exist_ok=True)
    analysis_bullet_points_path = os.path.join(output_folder, 'analyse_stichpunkte.txt')
    with open(analysis_bullet_points_path, 'w', encoding='utf-8') as f:
        f.write(analysis_bullet_points)

    # Speichern der Inhalts-Stichpunkte
    content_bullet_points_path = os.path.join(output_folder, 'inhalts_stichpunkte.txt')
    with open(content_bullet_points_path, 'w', encoding='utf-8') as f:
        f.write(combined_content_bullet_points)

    # Generiere und speichere die Gutachten mit verschiedenen Temperaturen
    temperatures = [0.3, 0.7, 1.0]
    for temp in temperatures:
        filename = f'gutachten_{temp}.txt'
        gutachten = generate_gutachten(combined_bullet_points, main_chapters, temp, filename, title, authors)

if __name__ == "__main__":
    main()
ASSISTANT
Hier ist der angeforderte Gradio-Interface-Code, der die gewünschten Funktionen implementiert:

```python
import gradio as gr
import os
import ollama
import PyPDF2
import textwrap
import sys
import io
import re
import time

# Konfiguriere sys.stdout auf UTF-8
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8')

# Hier kommen alle Funktionen aus deinem bestehenden Code
# Ich werde einige Anpassungen vornehmen, um sie mit Gradio kompatibel zu machen

def extract_text_from_pdf(pdf_file):
    """
    Extrahiert den gesamten Text aus einer PDF-Datei.
    """
    pdf_reader = PyPDF2.PdfReader(pdf_file)
    text = ""
    for page_num in range(len(pdf_reader.pages)):
        page = pdf_reader.pages[page_num]
        text += page.extract_text()
    return text

def extract_text_from_pages(pdf_file, start_page, end_page):
    """
    Extrahiert den Text aus spezifischen Seiten einer PDF-Datei.
    """
    pdf_reader = PyPDF2.PdfReader(pdf_file)
    text = ""
    for page_num in range(start_page, end_page + 1):
        page = pdf_reader.pages[page_num]
        text += page.extract_text()
    return text

def split_text_into_chunks(text, max_length=60000):
    """
    Teilt den Text in Abschnitte mit maximaler Länge.
    """
    return textwrap.wrap(text, max_length)

# Alle weiteren Funktionen bleiben im Wesentlichen gleich
# ...

# Jetzt definieren wir die Hauptfunktion, die von Gradio aufgerufen wird
def analyse_dissertation(pdf_file, temperatures, manual_title, manual_authors, auto_extract, progress=gr.Progress()):
    # Erstelle Ordner für Ausgaben
    output_folder = 'gutachten_output'
    os.makedirs(output_folder, exist_ok=True)
    
    # Liste zur Speicherung der Ergebnisse
    gutachten_results = []
    stichpunkte_text = ""
    inhalts_text = ""
    
    # Schritt 1: Titel und Autoren extrahieren oder manuell übernehmen
    if auto_extract:
        progress(0, desc="Extrahiere Titel und Autoren...")
        title, authors = extract_title_and_authors(pdf_file)
    else:
        title = manual_title
        authors = manual_authors
    
    # Schritt 2: Hauptkapitel extrahieren
    progress(0.1, desc="Extrahiere Hauptkapitel...")
    chapter_text = extract_text_from_pages(pdf_file, 1, 5)  # Seiten 2 bis 6
    system_prompt, user_prompt = create_chapter_prompt(chapter_text)
    main_chapters_raw = analyze_text_with_ollama(
        system_prompt,
        user_prompt,
        max_retries=7,
        num_predict=1024,
        analytics_check=False,
        model_name='llama3.1-64k',
    )
    main_chapters = [chapter.strip() for chapter in main_chapters_raw.strip().split('\n') if chapter.strip()]
    
    # Schritt 3: Gesamten Text extrahieren und in Abschnitte teilen
    progress(0.2, desc="Extrahiere Text aus PDF...")
    full_text = extract_text_from_pdf(pdf_file)
    text_chunks = split_text_into_chunks(full_text, max_length=15000)
    
    # Initiale Stichpunkte
    analysis_bullet_points = """1. Einordnung und Zielsetzung der Arbeit

2. Bewertung der Arbeit

3. Wichtige Notizen fürs Gutachten
"""
    content_bullet_points_list = []
    
    # Schritt 4: Analysiere Textabschnitte
    for i, chunk in enumerate(text_chunks):
        progress(0.3 + 0.3*(i/len(text_chunks)), desc=f"Analysiere Abschnitt {i+1}/{len(text_chunks)}...")
        # Analyse-LLM
        system_prompt, user_prompt = create_analysis_prompt(chunk)
        user_prompt = user_prompt.format(previous_bullet_points=analysis_bullet_points)
        new_analysis_bullet_points = analyze_text_with_ollama(
            system_prompt,
            user_prompt,
            max_retries=7,
            num_predict=1500,
            analytics_check=True,
            model_name='llama3.1-64k',
        )
        analysis_bullet_points = new_analysis_bullet_points  # Aktualisiere die Stichpunkte

        # Inhalts-LLM
        system_prompt, user_prompt = create_content_prompt(chunk)
        content_output = analyze_text_with_ollama(
            system_prompt,
            user_prompt,
            max_retries=7,
            num_predict=1500,
            analytics_check=False,
            model_name='llama3.1-64k',
        )
        content_bullet_points_list.append(content_output.strip())
    
    # Kombiniere die Stichpunkte
    combined_bullet_points = analysis_bullet_points.strip()
    combined_bullet_points += "\n\n**Inhaltszusammenfassung:**\n\n"
    combined_content_bullet_points = '\n\n'.join(content_bullet_points_list)
    
    # Falls die Inhalts-Stichpunkte zu lang sind, zusammenfassen
    if len(combined_content_bullet_points) > 10000:
        system_prompt, user_prompt = create_summary_prompt(combined_content_bullet_points)
        combined_content_bullet_points = analyze_text_with_ollama(
            system_prompt,
            user_prompt,
            max_retries=7,
            num_predict=5000,
            analytics_check=False,
            model_name='llama3.1-64k',
        )
    
    combined_bullet_points += combined_content_bullet_points
    stichpunkte_text = combined_bullet_points
    inhalts_text = combined_content_bullet_points
    
    # Speichere die Stichpunkte
    analysis_bullet_points_path = os.path.join(output_folder, 'analyse_stichpunkte.txt')
    with open(analysis_bullet_points_path, 'w', encoding='utf-8') as f:
        f.write(analysis_bullet_points)
    content_bullet_points_path = os.path.join(output_folder, 'inhalts_stichpunkte.txt')
    with open(content_bullet_points_path, 'w', encoding='utf-8') as f:
        f.write(combined_content_bullet_points)
    
    # Schritt 5: Generiere Gutachten für jede ausgewählte Temperatur
    for temp in temperatures:
        progress(0.7 + 0.1*temperatures.index(temp), desc=f"Generiere Gutachten (Temperature {temp})...")
        filename = f'gutachten_{temp}.txt'
        gutachten = generate_gutachten(combined_bullet_points, main_chapters, temp, filename, title, authors)
        gutachten_results.append(gutachten)
    
    # Schritt 6: Erstelle Download-Links für Dateien
    files_to_download = []
    for filename in os.listdir(output_folder):
        files_to_download.append(os.path.join(output_folder, filename))
    
    progress(1.0, desc="Fertig!")
    
    return stichpunkte_text, inhalts_text, gutachten_results, files_to_download

# Jetzt erstellen wir die Gradio-App
with gr.Blocks() as demo:
    gr.Markdown("## Dissertation Analyse Tool")
    
    with gr.Row():
        pdf_input = gr.File(label="Lade eine PDF-Datei hoch", file_types=['.pdf'])
        with gr.Column():
            temperature_03 = gr.Checkbox(value=True, label="Temperature 0.3")
            temperature_07 = gr.Checkbox(value=True, label="Temperature 0.7")
            temperature_10 = gr.Checkbox(value=True, label="Temperature 1.0")
        with gr.Column():
            auto_extract = gr.Checkbox(label="Titel und Autoren automatisch extrahieren", value=True)
            manual_title = gr.Textbox(label="Titel der Arbeit (wenn nicht automatisch)")
            manual_authors = gr.Textbox(label="Autoren der Arbeit (wenn nicht automatisch)")
    
    stichpunkte_output = gr.Textbox(label="Stichpunkte", lines=10)
    inhalts_output = gr.Textbox(label="Inhaltszusammenfassung", lines=10)
    
    gutachten_outputs = []
    for temp in [0.3, 0.7, 1.0]:
        gutachten_outputs.append(gr.Textbox(label=f"Gutachten (Temperature {temp})", visible=False, lines=10))
    
    files_output = gr.File(label="Generierte Dateien herunterladen", file_count="multiple")
    
    def update_visibility(temp_03, temp_07, temp_10):
        visibilities = [temp_03, temp_07, temp_10]
        return visibilities
    
    # Event-Handler für die Sichtbarkeit der Gutachten
    visibility_btn = gr.Button("Aktualisiere Sichtbarkeit")
    visibility_btn.click(
        fn=update_visibility,
        inputs=[temperature_03, temperature_07, temperature_10],
        outputs=gutachten_outputs
    )
    
    # Hauptausführung
    start_btn = gr.Button("Starte Analyse")
    start_btn.click(
        fn=analyse_dissertation,
        inputs=[pdf_input, [temperature_03, temperature_07, temperature_10],
                manual_title, manual_authors, auto_extract],
        outputs=[stichpunkte_output, inhalts_output] + gutachten_outputs + [files_output]
    )

demo.launch()
```

**Erläuterungen:**

- **PDF-Upload:** Über `gr.File()` können Benutzer eine PDF-Datei hochladen.
- **Temperatur-Checkboxen:** Es gibt drei Checkboxen für die Temperaturen 0.3, 0.7 und 1.0, die standardmäßig aktiviert sind.
- **Titel und Autoren eingeben oder automatisch extrahieren:** Mit einer Checkbox können Benutzer auswählen, ob Titel und Autoren automatisch extrahiert werden sollen. Wenn nicht, können sie diese manuell in Textboxen eingeben.
- **Stichpunkte und Inhaltszusammenfassung:** Zwei Textboxen zeigen live die Stichpunkte und die Inhaltszusammenfassung an.
- **Gutachten-Anzeige:** Je nachdem, welche Temperaturen ausgewählt wurden, werden bis zu drei Textboxen angezeigt, in denen die generierten Gutachten angezeigt werden.
- **Dateien herunterladen:** Am Ende können Benutzer alle generierten Dateien über `gr.File()` herunterladen.
- **Fortschrittsanzeige:** Mit `gr.Progress()` wird der Fortschritt der Analyse angezeigt.
- **Sichtbarkeit der Gutachten:** Die Sichtbarkeit der Gutachten-Textboxen wird dynamisch aktualisiert, basierend auf den ausgewählten Temperaturen.
- **Streaming-Ausgabe:** In diesem Beispiel wird die Ausgabe nicht zeichenweise gestreamt, da Gradio standardmäßig die gesamte Ausgabe nach Abschluss der Funktion anzeigt. Um echtes Streaming zu implementieren, müssten die Funktionen angepasst werden, was den Rahmen hier sprengen würde.

**Hinweise:**

- Stellen Sie sicher, dass alle notwendigen Pakete installiert sind (`gradio`, `PyPDF2`, `ollama`, etc.).
- Passen Sie ggf. den Pfad und den Namen des Modells in den `analyze_text_with_ollama`-Funktionen an.
- Die Funktion `analyse_dissertation` kombiniert die einzelnen Schritte und wird von Gradio aufgerufen.
- Die Dateien werden im Ordner `gutachten_output` gespeichert und können am Ende heruntergeladen werden.

Bitte ersetzen Sie die Platzhalterfunktionen und -texte durch Ihre tatsächlichen Implementierungen und achten Sie darauf, dass alle Dateipfade korrekt sind.

turns-00053.parquet:1883

164d5bcbac697600ad7b4814
turn 1/12gpt-4o-mini-2024-07-18EnglishItaly102 words
degenerate_repetitionAbsentFinal dense release
USER
Give me 3 options of title for this paragraph, is going in a newsletter:
What are your goals as we head into the new year?
Are you aiming for the Next Leadership Training Seminar in Tenerife, Casablanca, or Fiji? If you're a first-time qualifier, it's not too late to embark on this journey - check out the qualification criteria.
We look forward to seeing you there!
ASSISTANT
1. "Kickstart Your New Year: Set Your Goals for Our Next Leadership Training Seminars!"
2. "Chart Your Path: Join Us for Leadership Training in Paradise!"
3. "New Year, New Goals: Your Ticket to Leadership Training Awaits!"

turns-00053.parquet:1884

203a0b1806ac10aea0f3ab5e
turn 2/12gpt-4o-mini-2024-07-18EnglishItaly31 words
degenerate_repetitionAbsentFinal dense release
USER
shorter and less advertising make it simpler
ASSISTANT
1. "Set Your Goals for the New Year"
2. "Plan for Our Upcoming Leadership Seminars"
3. "Ready for the New Year? Let's Talk Goals!"

turns-00053.parquet:1885

302fd03b00ff7b04ade348db
turn 3/12gpt-4o-mini-2024-07-18EnglishItaly1215 words
degenerate_repetitionAbsentFinal dense release
USER
Add another sentence to the intro of this newsletter please, don’t change the one that there is now but add another one to talk a bit about the “soul” of the newsletter:

Dear Amway Business Owners and Leaders,
As we wrap up an incredible year, we want to take a moment to reflect on the progress we've made together and the exciting opportunities that await us in 2025! 
Congratulations to the New Platinums from the New Platinum Seminar in Sydney, Izmir, and Krakow! You’ve made significant strides in your Amway Leadership journey by setting plans focused on Healthy Lifestyle and Healthy Growth. 

Be sure to watch the highlights of your achievements in our video!

Watch the video 
(only link to local event video)

What are your goals as we head into the new year?
Are you aiming for the Next Leadership Training Seminar in Tenerife, Casablanca, or Fiji? If you're a first-time qualifier, it's not too late to embark on this journey - check out the qualification criteria.

Learn more (link to LTS on local website: https://www.amway.co.uk/incentive-business-trips/leadership-training-seminar )
We look forward to seeing you there!

Save on Your Artistry Labs Retexturizing System Refill
Attention Artistry Labs Aquabrasion Device owners! Enjoy amazing results from your 28-day treatment with the Retexturizing Peel and Serum, leaving your skin smoother, cleaner, and brighter.
Remember to repeat this treatment quarterly. 
Great news: you can get your next System Refill at a discount!
If you’ve purchased the Artistry Labs Retexturizing System (SKU 126807), you’ll receive a €15 discount on the System Refill (SKU 125547) in January or February 2025.
It's the perfect time to stock up for your next treatment!

Important Update: Changes to the Body Cleansing Program
We are continuously working to simplify our product offerings while staying true to our commitment to sustainability. As a result, there will be some changes to the Body Cleansing Program (BCP) starting January 7, 2025.
What You Need to Know:
•	The pre-packed bundle (SKU 127059) will no longer have a 10% discount and will become a full-value item.
•	The virtual bundle (SKU 317514) will keep its 10% discount and the same value benefits.
Look for the new pricing details in the April 2025 Price List, and you can also find updated information on the Pricing App and the BCP product pages on Amway Online.

Thanks for your continued support as we strive to enhance your experience with our products!
Key Updates for Your MyBODY.ID Experience
We're enhancing your business experience with some key updates.
New Amway Website Launch
On January 1, 2025, our new website for Germany and Austria will be your go-to resource.
MyBODY.ID Brand Pages
Also launching on January 1, the new Nutrilite MyBODY.ID brand pages will include:
•	15 tailored PDF recipes
•	Articles for various genetic profiles
Genetic Test Enhancements
New Users can register and access results at www.nutrilitemybodyid.de starting January 1.
Important Note
The current MyBODY.ID platform and app will be discontinued on January 1. Please download and save your data.
New Referral Program
From January to June 2025, enjoy a €10 discount on your next BCP or Energy Program purchase with the MyBODY.ID starter kit.
Stay tuned for more updates!
Launch of SA8™: Revolutionizing Laundry for a Greener Future!
We’re excited to introduce the reformulated Premium Concentrated Laundry Powder Detergent SA8™ in Turkey, launching January 2025!
Key Benefits:
•	Powerful Cleaning: Advanced enzymes tackle tough stains even in cold water, with oxygen bleach and brighteners for vibrant clothes.
•	Eco-Friendly: Made from plant-based, biodegradable ingredients and certified by the EU Ecolabel.
•	Gentle on Skin: Dermatologically tested for non-irritation on all skin types.
Join us in embracing sustainability while enjoying top-notch cleaning for your family!
ASSISTANT
Dear Amway Business Owners and Leaders,  
As we wrap up an incredible year, we want to take a moment to reflect on the progress we've made together and the exciting opportunities that await us in 2025!  
Congratulations to the New Platinums from the New Platinum Seminar in Sydney, Izmir, and Krakow! You’ve made significant strides in your Amway Leadership journey by setting plans focused on Healthy Lifestyle and Healthy Growth.  

This newsletter is designed to inspire and motivate you, fostering our shared vision of growth, community, and success.  

Be sure to watch the highlights of your achievements in our video!  

Watch the video  
(only link to local event video)

What are your goals as we head into the new year?  
Are you aiming for the Next Leadership Training Seminar in Tenerife, Casablanca, or Fiji? If you're a first-time qualifier, it's not too late to embark on this journey - check out the qualification criteria.  

Learn more (link to LTS on local website: https://www.amway.co.uk/incentive-business-trips/leadership-training-seminar)  
We look forward to seeing you there!  

Save on Your Artistry Labs Retexturizing System Refill  
Attention Artistry Labs Aquabrasion Device owners! Enjoy amazing results from your 28-day treatment with the Retexturizing Peel and Serum, leaving your skin smoother, cleaner, and brighter.  
Remember to repeat this treatment quarterly.  
Great news: you can get your next System Refill at a discount!  
If you’ve purchased the Artistry Labs Retexturizing System (SKU 126807), you’ll receive a €15 discount on the System Refill (SKU 125547) in January or February 2025.  
It's the perfect time to stock up for your next treatment!  

Important Update: Changes to the Body Cleansing Program  
We are continuously working to simplify our product offerings while staying true to our commitment to sustainability. As a result, there will be some changes to the Body Cleansing Program (BCP) starting January 7, 2025.  
What You Need to Know:  
• The pre-packed bundle (SKU 127059) will no longer have a 10% discount and will become a full-value item.  
• The virtual bundle (SKU 317514) will keep its 10% discount and the same value benefits.  
Look for the new pricing details in the April 2025 Price List, and you can also find updated information on the Pricing App and the BCP product pages on Amway Online.  

Thanks for your continued support as we strive to enhance your experience with our products!  
Key Updates for Your MyBODY.ID Experience  
We're enhancing your business experience with some key updates.  
New Amway Website Launch  
On January 1, 2025, our new website for Germany and Austria will be your go-to resource.  
MyBODY.ID Brand Pages  
Also launching on January 1, the new Nutrilite MyBODY.ID brand pages will include:  
• 15 tailored PDF recipes  
• Articles for various genetic profiles  
Genetic Test Enhancements  
New Users can register and access results at www.nutrilitemybodyid.de starting January 1.  
Important Note  
The current MyBODY.ID platform and app will be discontinued on January 1. Please download and save your data.  
New Referral Program  
From January to June 2025, enjoy a €10 discount on your next BCP or Energy Program purchase with the MyBODY.ID starter kit.  
Stay tuned for more updates!  
Launch of SA8™: Revolutionizing Laundry for a Greener Future!  
We’re excited to introduce the reformulated Premium Concentrated Laundry Powder Detergent SA8™ in Turkey, launching January 2025!  
Key Benefits:  
• Powerful Cleaning: Advanced enzymes tackle tough stains even in cold water, with oxygen bleach and brighteners for vibrant clothes.  
• Eco-Friendly: Made from plant-based, biodegradable ingredients and certified by the EU Ecolabel.  
• Gentle on Skin: Dermatologically tested for non-irritation on all skin types.  
Join us in embracing sustainability while enjoying top-notch cleaning for your family!

turns-00053.parquet:1886

a66a23859ba44e8d17a86d68
turn 4/12gpt-4o-mini-2024-07-18EnglishItaly91 words
degenerate_repetitionAbsentFinal dense release
USER
only the intro
ASSISTANT
Dear Amway Business Owners and Leaders,  
As we wrap up an incredible year, we want to take a moment to reflect on the progress we've made together and the exciting opportunities that await us in 2025! This newsletter is designed to inspire and motivate you, fostering our shared vision of growth, community, and success. Congratulations to the New Platinums from the New Platinum Seminar in Sydney, Izmir, and Krakow! You’ve made significant strides in your Amway Leadership journey by setting plans focused on Healthy Lifestyle and Healthy Growth.  

turns-00053.parquet:1887

281f89b4ec4e4f3727f49c08
turn 5/12gpt-4o-mini-2024-07-18EnglishItaly68 words
degenerate_repetitionAbsentFinal dense release
USER
shorten the second part
ASSISTANT
Dear Amway Business Owners and Leaders,  
As we wrap up an incredible year, we want to reflect on our progress together and the exciting opportunities that await us in 2025! This newsletter is here to inspire and unite us as we continue our journey in growth and success. Congratulations to the New Platinums from the recent seminars—you’ve made significant strides in your leadership journey!

turns-00053.parquet:1888

6463b4881cb4bd1990f79089
turn 6/12gpt-4o-mini-2024-07-18EnglishItaly68 words
degenerate_repetitionAbsentFinal dense release
USER
rewrite only the intro
ASSISTANT
Dear Amway Business Owners and Leaders,  
As we conclude an incredible year, let’s take a moment to celebrate our shared achievements and look forward to the opportunities 2025 will bring. This newsletter aims to inspire and strengthen our community as we pursue continued growth and success together. Congratulations to the New Platinums from the recent seminars for your remarkable progress on your leadership journey!

turns-00053.parquet:1889

2f4e9b0a27d7d62cca1ccab5
turn 7/12gpt-4o-mini-2024-07-18EnglishItaly82 words
degenerate_repetitionAbsentFinal dense release
USER
Don’t say “this news letter is about” but storytell it like together, success, bla bla
ASSISTANT
Dear Amway Business Owners and Leaders,  
As we conclude an incredible year, let's take a moment to celebrate our shared achievements and envision the opportunities that await us in 2025. Together, we have built a community rooted in support and growth, and your dedication inspires us all. Congratulations to the New Platinums from the recent seminars for your remarkable progress on this journey toward leadership and success!

turns-00053.parquet:1890

c6021098e1d442c67567f897
turn 8/12gpt-4o-mini-2024-07-18EnglishItaly71 words
degenerate_repetitionAbsentFinal dense release
USER
Sum it up a bit better please, make it more inspiring
ASSISTANT
Dear Amway Business Owners and Leaders,  
As we close out an extraordinary year, let’s celebrate the incredible achievements we've made together and the bright opportunities that lie ahead in 2025. Our community thrives on support and shared aspirations, and your commitment fuels our collective success. Congratulations to the New Platinums from the recent seminars—your journey of leadership inspires us all!

turns-00053.parquet:1891

a5fdba55fc59938f2edf02c9
turn 9/12gpt-4o-mini-2024-07-18EnglishItaly720 words
degenerate_repetitionAbsentFinal dense release
USER
write an intro for this newsletter "Congratulations to the New Platinums from the New Platinum Seminar in Sydney, Izmir, and Krakow! You’ve made significant strides in your Amway Leadership journey by setting plans focused on Healthy Lifestyle and Healthy Growth. 

Be sure to watch the highlights of your achievements in our video!

Watch the video 
(only link to local event video)

What are your goals as we head into the new year?
Are you aiming for the Next Leadership Training Seminar in Tenerife, Casablanca, or Fiji? If you're a first-time qualifier, it's not too late to embark on this journey - check out the qualification criteria.

Learn more (link to LTS on local website: https://www.amway.co.uk/incentive-business-trips/leadership-training-seminar )
We look forward to seeing you there!

Save on Your Artistry Labs Retexturizing System Refill
Attention Artistry Labs Aquabrasion Device owners! Enjoy amazing results from your 28-day treatment with the Retexturizing Peel and Serum, leaving your skin smoother, cleaner, and brighter.
Remember to repeat this treatment quarterly. 
Great news: you can get your next System Refill at a discount!
If you’ve purchased the Artistry Labs Retexturizing System (SKU 126807), you’ll receive a €15 discount on the System Refill (SKU 125547) in January or February 2025.
It's the perfect time to stock up for your next treatment!

Important Update: Changes to the Body Cleansing Program
We are continuously working to simplify our product offerings while staying true to our commitment to sustainability. As a result, there will be some changes to the Body Cleansing Program (BCP) starting January 7, 2025.
What You Need to Know:
•	The pre-packed bundle (SKU 127059) will no longer have a 10% discount and will become a full-value item.
•	The virtual bundle (SKU 317514) will keep its 10% discount and the same value benefits.
Look for the new pricing details in the April 2025 Price List, and you can also find updated information on the Pricing App and the BCP product pages on Amway Online.

Thanks for your continued support as we strive to enhance your experience with our products!
Key Updates for Your MyBODY.ID Experience
We're enhancing your business experience with some key updates.
New Amway Website Launch
On January 1, 2025, our new website for Germany and Austria will be your go-to resource.
MyBODY.ID Brand Pages
Also launching on January 1, the new Nutrilite MyBODY.ID brand pages will include:
•	15 tailored PDF recipes
•	Articles for various genetic profiles
Genetic Test Enhancements
New Users can register and access results at www.nutrilitemybodyid.de starting January 1.
Important Note
The current MyBODY.ID platform and app will be discontinued on January 1. Please download and save your data.
New Referral Program
From January to June 2025, enjoy a €10 discount on your next BCP or Energy Program purchase with the MyBODY.ID starter kit.
Stay tuned for more updates!
Launch of SA8™: Revolutionizing Laundry for a Greener Future!
We’re excited to introduce the reformulated Premium Concentrated Laundry Powder Detergent SA8™ in Turkey, launching January 2025!
Key Benefits:
•	Powerful Cleaning: Advanced enzymes tackle tough stains even in cold water, with oxygen bleach and brighteners for vibrant clothes.
•	Eco-Friendly: Made from plant-based, biodegradable ingredients and certified by the EU Ecolabel.
•	Gentle on Skin: Dermatologically tested for non-irritation on all skin types.
Join us in embracing sustainability while enjoying top-notch cleaning for your family!
"
ASSISTANT
Dear Amway Business Owners and Leaders,  

As we celebrate the achievements of our incredible New Platinums from the recent seminars in Sydney, Izmir, and Krakow, we are reminded of the power of dedication and vision on our leadership journey. Your commitment to fostering a Healthy Lifestyle and Healthy Growth empowers not only your own success but also our entire community. Let's take a moment to reflect on your hard work and look forward to new ambitions as we enter the new year. Be sure to catch the highlights of your remarkable accomplishments in our video—it's a true testament to what we can achieve together!

As we gear up for the next chapter, consider what goals you want to set for yourself. Are you ready to qualify for the upcoming Leadership Training Seminars in Tenerife, Casablanca, or Fiji? This is the perfect time to embark on that journey if you haven’t already.  

We look forward to supporting you in achieving even greater heights in the year ahead!