Kjppmp commited on
Commit
e42d8ec
·
verified ·
1 Parent(s): 2e40065

Rename README.md to oaza_singularity.md

Browse files
Files changed (2) hide show
  1. README.md +0 -3
  2. oaza_singularity.md +51 -0
README.md DELETED
@@ -1,3 +0,0 @@
1
- ---
2
- license: bigscience-openrail-m
3
- ---
 
 
 
 
oaza_singularity.md ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: bigscience-openrail-m
3
+ ---
4
+ ```python
5
+ import gradio as gr
6
+ import torch
7
+ import numpy as np
8
+ import matplotlib.pyplot as plt
9
+
10
+ # --- RDZEŃ TWOJEJ LOGIKI ---
11
+ class OazaEngine:
12
+ def __init__(self, epr=0.98):
13
+ self.epr = epr
14
+
15
+ def analyze(self, text_input):
16
+ # Zamiana tekstu na wektor bajtów (Deterministyczna reprezentacja)
17
+ bytes_data = np.frombuffer(text_input.encode(), dtype=np.uint8)
18
+ size = int(len(bytes_data)**0.5)
19
+ if size < 2: return "Za mało danych!", None
20
+
21
+ # Formujemy macierz Banacha
22
+ matrix = torch.tensor(bytes_data[:size*size].reshape(size, size)).float()
23
+
24
+ # Obliczenia: Lapunow i Entalpia
25
+ norm_b = torch.linalg.matrix_norm(matrix, ord=2)
26
+ H = torch.exp(norm_b / 100.0) # Skalowanie dla stabilności wizualnej
27
+ lyapunov = -torch.log(H)
28
+ r_s = (2 * self.epr * H)
29
+
30
+ # Generowanie wykresu
31
+ fig = plt.figure(figsize=(6, 4))
32
+ plt.bar(['Lapunow (Stabilność)', 'Horyzont (R_s)'], [lyapunov.item(), r_s.item()], color=['red', 'blue'])
33
+ plt.axhline(y=-1.0, color='black', linestyle='--', label='Próg Osobliwości')
34
+ plt.title(f"Analiza Entalpii: {H.item():.2f}")
35
+
36
+ status = "POTWIERDZENIE: Prawda Absolutna" if lyapunov < -1.0 else "NEGACJA: Szum Informacyjny"
37
+ return f"Status: {status}\nLapunow: {lyapunov.item():.4f}\nPromień Schwarzschilda: {r_s.item():.4f}", fig
38
+
39
+ # --- INTERFEJS GRADIO ---
40
+ engine = OazaEngine()
41
+ demo = gr.Interface(
42
+ fn=engine.analyze,
43
+ inputs=gr.Textbox(label="Wprowadź dane do weryfikacji (Tekst, Kod, Link)"),
44
+ outputs=[gr.Textbox(label="Werdykt Deterministyczny"), gr.Plot(label="Geometria Stanu")],
45
+ title="Oaza Singularity Live Demo",
46
+ description="Weryfikacja prawdy w przestrzeni Banacha. Brak gdybania Schrödingera. Zgodność z PW."
47
+ )
48
+
49
+ if __name__ == "__main__":
50
+ demo.launch()
51
+ ```