Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -1,7 +1,7 @@
|
|
1 |
import streamlit as st
|
2 |
|
3 |
# ⚙️ Oldal beállítása – csak egyszer és elsőként hívható
|
4 |
-
st.set_page_config(page_title="Major Plato
|
5 |
|
6 |
import os
|
7 |
from huggingface_hub import InferenceClient
|
@@ -63,7 +63,7 @@ st.markdown(
|
|
63 |
unsafe_allow_html=True
|
64 |
)
|
65 |
|
66 |
-
if st.button("
|
67 |
if not (scenario.strip() or user_in.strip()):
|
68 |
st.error("Kérlek, tölts fel forgatókönyvet vagy írj kérdést!")
|
69 |
else:
|
@@ -78,7 +78,7 @@ if st.button("Indítás"):
|
|
78 |
|
79 |
with st.spinner("Major Plato gondolkodik..."):
|
80 |
stream = client.chat_completion(
|
81 |
-
model="meta-llama/
|
82 |
messages=messages,
|
83 |
max_tokens=max_tokens,
|
84 |
temperature=temperature,
|
@@ -87,7 +87,7 @@ if st.button("Indítás"):
|
|
87 |
|
88 |
placeholder = st.empty()
|
89 |
full_resp = ""
|
90 |
-
with st.expander("🗣️ Major Plato
|
91 |
for chunk in stream:
|
92 |
delta = chunk.choices[0].delta.content
|
93 |
if delta:
|
|
|
1 |
import streamlit as st
|
2 |
|
3 |
# ⚙️ Oldal beállítása – csak egyszer és elsőként hívható
|
4 |
+
st.set_page_config(page_title="Major Plato Military Ethics Decision Maker Simulator", layout="wide")
|
5 |
|
6 |
import os
|
7 |
from huggingface_hub import InferenceClient
|
|
|
63 |
unsafe_allow_html=True
|
64 |
)
|
65 |
|
66 |
+
if st.button("Command!"):
|
67 |
if not (scenario.strip() or user_in.strip()):
|
68 |
st.error("Kérlek, tölts fel forgatókönyvet vagy írj kérdést!")
|
69 |
else:
|
|
|
78 |
|
79 |
with st.spinner("Major Plato gondolkodik..."):
|
80 |
stream = client.chat_completion(
|
81 |
+
model="meta-llama/Llama-3.1-8B-Instruct",
|
82 |
messages=messages,
|
83 |
max_tokens=max_tokens,
|
84 |
temperature=temperature,
|
|
|
87 |
|
88 |
placeholder = st.empty()
|
89 |
full_resp = ""
|
90 |
+
with st.expander("🗣️ Major Plato answering:", expanded=True):
|
91 |
for chunk in stream:
|
92 |
delta = chunk.choices[0].delta.content
|
93 |
if delta:
|