Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -150,21 +150,23 @@ def main():
|
|
150 |
# Generate the full interpretation using GPU
|
151 |
interpretation = generate_interpretation(question, cards, text_model, text_tokenizer)
|
152 |
|
|
|
|
|
153 |
# Format the output
|
154 |
output += "### Card Analysis\n"
|
155 |
for i, card in enumerate(cards, 1):
|
156 |
-
output += f"**
|
157 |
output += "### Full Interpretation\n"
|
158 |
output += interpretation
|
159 |
-
output += "\n\n**Reading
|
160 |
return output
|
161 |
except Exception as e:
|
162 |
return f"Error in reading: {str(e)}"
|
163 |
|
164 |
# Set up the Gradio interface
|
165 |
with gr.Blocks() as demo:
|
166 |
-
gr.Markdown("# 🔮
|
167 |
-
gr.Markdown("###
|
168 |
question = gr.Textbox(
|
169 |
label="Your Question",
|
170 |
placeholder="Enter your question for the cards...",
|
@@ -184,7 +186,7 @@ def main():
|
|
184 |
outputs=output
|
185 |
)
|
186 |
|
187 |
-
# Launch the application
|
188 |
demo.launch()
|
189 |
|
190 |
# Entry point of the script
|
|
|
150 |
# Generate the full interpretation using GPU
|
151 |
interpretation = generate_interpretation(question, cards, text_model, text_tokenizer)
|
152 |
|
153 |
+
card_cat = ['Reason Card', 'Result Card', 'Recommendation Card']
|
154 |
+
|
155 |
# Format the output
|
156 |
output += "### Card Analysis\n"
|
157 |
for i, card in enumerate(cards, 1):
|
158 |
+
output += f"**{card_cat[i]}:** {card}\n\n"
|
159 |
output += "### Full Interpretation\n"
|
160 |
output += interpretation
|
161 |
+
output += "\n\n**Reading Ends.**"
|
162 |
return output
|
163 |
except Exception as e:
|
164 |
return f"Error in reading: {str(e)}"
|
165 |
|
166 |
# Set up the Gradio interface
|
167 |
with gr.Blocks() as demo:
|
168 |
+
gr.Markdown("# 🔮 Acrane Intelligence (A.I.)")
|
169 |
+
gr.Markdown("### Artifical Intelligence Supported Tarot Reading Application")
|
170 |
question = gr.Textbox(
|
171 |
label="Your Question",
|
172 |
placeholder="Enter your question for the cards...",
|
|
|
186 |
outputs=output
|
187 |
)
|
188 |
|
189 |
+
# Launch the application
|
190 |
demo.launch()
|
191 |
|
192 |
# Entry point of the script
|