Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -13,36 +13,10 @@ tokenizer = AutoTokenizer.from_pretrained(model_repo_path)
|
|
13 |
model = AutoModelForSeq2SeqLM.from_pretrained(model_repo_path).to(device)
|
14 |
|
15 |
# Streamlit app layout
|
16 |
-
st.
|
17 |
-
|
18 |
-
st.title("Minecraft Query Wizard π§ββοΈ")
|
19 |
-
|
20 |
-
st.markdown("""
|
21 |
-
<style>
|
22 |
-
.main {
|
23 |
-
background-color: #f5f5f5;
|
24 |
-
font-family: Arial, sans-serif;
|
25 |
-
}
|
26 |
-
.stButton>button {
|
27 |
-
background-color: #4CAF50 !important;
|
28 |
-
color: white !important;
|
29 |
-
font-size: 18px !important;
|
30 |
-
padding: 10px 20px !important;
|
31 |
-
border-radius: 8px !important;
|
32 |
-
}
|
33 |
-
</style>
|
34 |
-
""", unsafe_allow_html=True)
|
35 |
-
|
36 |
-
st.markdown("### Welcome to the Minecraft Query Wizard! π")
|
37 |
-
st.markdown("This tool allows you to ask any Minecraft-related questions and get accurate answers using the latest AI technology.")
|
38 |
-
|
39 |
-
st.markdown("#### How to use:")
|
40 |
-
st.markdown("1. Enter your Minecraft-related question in the text area below.")
|
41 |
-
st.markdown("2. Click the 'Get Answer' button to generate a response.")
|
42 |
-
st.markdown("3. See the magic happen! β¨")
|
43 |
|
44 |
# User input
|
45 |
-
question_input = st.text_area("Enter
|
46 |
|
47 |
# Answer the question
|
48 |
if st.button("Get Answer"):
|
@@ -60,9 +34,4 @@ if st.button("Get Answer"):
|
|
60 |
except Exception as e:
|
61 |
st.error(f"Error during question answering: {e}")
|
62 |
else:
|
63 |
-
st.warning("Please enter a question to get an answer.")
|
64 |
-
|
65 |
-
st.markdown("---")
|
66 |
-
st.markdown("### About the Creators")
|
67 |
-
st.markdown("**Creator 1:** Name of Creator 1")
|
68 |
-
st.markdown("**Creator 2:** Name of Creator 2")
|
|
|
13 |
model = AutoModelForSeq2SeqLM.from_pretrained(model_repo_path).to(device)
|
14 |
|
15 |
# Streamlit app layout
|
16 |
+
st.title("Minecraft Query Wizard")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
17 |
|
18 |
# User input
|
19 |
+
question_input = st.text_area("Enter a Minecraft-related question", height=150)
|
20 |
|
21 |
# Answer the question
|
22 |
if st.button("Get Answer"):
|
|
|
34 |
except Exception as e:
|
35 |
st.error(f"Error during question answering: {e}")
|
36 |
else:
|
37 |
+
st.warning("Please enter a question to get an answer.")
|
|
|
|
|
|
|
|
|
|