Spaces:
Sleeping
Sleeping
MilanCalegari
commited on
Commit
·
f2884d5
1
Parent(s):
17536fa
Refactor: Update Readme and clean code
Browse files- README.md +89 -1
- app.py +0 -6
- modules/interfaces/llm_interface.py +0 -14
README.md
CHANGED
@@ -11,4 +11,92 @@ license: mit
|
|
11 |
short_description: Your AI fortune teller 🔮
|
12 |
---
|
13 |
|
14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
11 |
short_description: Your AI fortune teller 🔮
|
12 |
---
|
13 |
|
14 |
+
# Arcana
|
15 |
+
|
16 |
+

|
17 |
+
|
18 |
+
## Description
|
19 |
+
|
20 |
+
Arcana is an artificial intelligence application that acts as your personal fortune teller, providing personalized predictions and insights.
|
21 |
+
|
22 |
+
## Features
|
23 |
+
|
24 |
+
- Personalized AI-based predictions
|
25 |
+
- Interactive and user-friendly interface
|
26 |
+
- Real-time updates
|
27 |
+
|
28 |
+
## Technologies Used
|
29 |
+
|
30 |
+
- Python
|
31 |
+
- Streamlit 1.41.1
|
32 |
+
- Hugging Face
|
33 |
+
|
34 |
+
## Installation
|
35 |
+
|
36 |
+
1. Clone the repository:
|
37 |
+
|
38 |
+
```bash
|
39 |
+
git clone https://github.com/MilanCalegari/Arcana.git
|
40 |
+
```
|
41 |
+
|
42 |
+
2. Navigate to project folder:
|
43 |
+
```bash
|
44 |
+
cd Arcana
|
45 |
+
```
|
46 |
+
|
47 |
+
3. Create a virtual environment:
|
48 |
+
|
49 |
+
```bash
|
50 |
+
python -m venv env
|
51 |
+
```
|
52 |
+
|
53 |
+
4. Activate virtual enviroment:
|
54 |
+
* On Windows:
|
55 |
+
```bash
|
56 |
+
env\Scripts\activate
|
57 |
+
```
|
58 |
+
|
59 |
+
* On macOS/Linux:
|
60 |
+
```bash
|
61 |
+
source env/bin/activate
|
62 |
+
```
|
63 |
+
|
64 |
+
5. Install dependencies:
|
65 |
+
````bash
|
66 |
+
pip install -r requirements.txt
|
67 |
+
```
|
68 |
+
|
69 |
+
## Deployed version available on Hugging Spaces
|
70 |
+
[Deployed Arcana](https://huggingface.co/spaces/rmcalegari/Arcana)
|
71 |
+
|
72 |
+
|
73 |
+
## Usage
|
74 |
+
1. Ensure the virtual environment is activate
|
75 |
+
|
76 |
+
2. Export your huggingface token:
|
77 |
+
* On Windows
|
78 |
+
```
|
79 |
+
SET HF_TOKEN="YOUR_TOKEN_HERE"
|
80 |
+
```
|
81 |
+
* On macOS/Linux
|
82 |
+
|
83 |
+
```bash
|
84 |
+
export HF_TOKEN="YOUR_TOKEN_HERE"
|
85 |
+
```
|
86 |
+
|
87 |
+
3. Run the application:
|
88 |
+
```bash
|
89 |
+
streamlit run app.py
|
90 |
+
```
|
91 |
+
|
92 |
+
4. Acess the application in your browser at http://localhost:8501
|
93 |
+
|
94 |
+
## Future Features
|
95 |
+
- [ ] Handle Multiple Languages
|
96 |
+
- [ ] Local Version using Ollama
|
97 |
+
- [ ] Add more reading methods
|
98 |
+
|
99 |
+
|
100 |
+
## License
|
101 |
+
This project is licensed under the MIT License.
|
102 |
+
|
app.py
CHANGED
@@ -42,12 +42,6 @@ with st.sidebar:
|
|
42 |
step=0.1,
|
43 |
help="Probability of a card appearing reversed (0.0 to 1.0)",
|
44 |
)
|
45 |
-
# TODO: Add Portuguese language support and translation
|
46 |
-
# language = st.selectbox(
|
47 |
-
# "Language",
|
48 |
-
# ["English", "Portuguese"],
|
49 |
-
# index=0
|
50 |
-
# )
|
51 |
|
52 |
# User interface texts
|
53 |
welcome_text = "### Welcome to your Tarot Reading"
|
|
|
42 |
step=0.1,
|
43 |
help="Probability of a card appearing reversed (0.0 to 1.0)",
|
44 |
)
|
|
|
|
|
|
|
|
|
|
|
|
|
45 |
|
46 |
# User interface texts
|
47 |
welcome_text = "### Welcome to your Tarot Reading"
|
modules/interfaces/llm_interface.py
DELETED
@@ -1,14 +0,0 @@
|
|
1 |
-
from abc import ABC, abstractmethod
|
2 |
-
from typing import Dict, List, Optional
|
3 |
-
|
4 |
-
from modules.utils.commom import Card, CardReadingMethod
|
5 |
-
|
6 |
-
|
7 |
-
class CardInterpreterInterface(ABC):
|
8 |
-
@abstractmethod
|
9 |
-
def generate_interpretation(self, cards: List[Card], context: Optional[str], method: CardReadingMethod) -> str:
|
10 |
-
...
|
11 |
-
|
12 |
-
@abstractmethod
|
13 |
-
def generate_prompt(self, cards: List[Card], context: str, method: CardReadingMethod) -> List[Dict[str, str]]:
|
14 |
-
...
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|