Spaces:
Sleeping
Sleeping
Commit
Β·
3069fab
1
Parent(s):
d7db9b7
[Update]: Refined app.py for GPU integration and code clarity π
Browse files- Added: Import for `spaces` to enable GPU functionality.
- Removed: @spaces.GPU decorator from the MemoryWave class to streamline GPU usage.
- Pro Tip of the Commit: Sometimes, less decoration leads to clearer waves! πβ¨
Aye, Aye! π’
app.py
CHANGED
@@ -10,6 +10,7 @@ and interact like waves in an ocean of consciousness.
|
|
10 |
|
11 |
Created by: Aye & Hue (with Trisha from Accounting keeping the numbers flowing)
|
12 |
"""
|
|
|
13 |
import os
|
14 |
import gradio as gr
|
15 |
import torch
|
@@ -161,7 +162,6 @@ class EmotionalContext:
|
|
161 |
"""String representation of emotional context."""
|
162 |
return f"EmotionalContext(valence={self.valence.item():.2f}, arousal={self.arousal.item():.2f})"
|
163 |
|
164 |
-
@spaces.GPU(duration=10)
|
165 |
class MemoryWave:
|
166 |
"""
|
167 |
Implements the wave-based memory patterns from Mem|8 paper.
|
|
|
10 |
|
11 |
Created by: Aye & Hue (with Trisha from Accounting keeping the numbers flowing)
|
12 |
"""
|
13 |
+
import spaces
|
14 |
import os
|
15 |
import gradio as gr
|
16 |
import torch
|
|
|
162 |
"""String representation of emotional context."""
|
163 |
return f"EmotionalContext(valence={self.valence.item():.2f}, arousal={self.arousal.item():.2f})"
|
164 |
|
|
|
165 |
class MemoryWave:
|
166 |
"""
|
167 |
Implements the wave-based memory patterns from Mem|8 paper.
|