Spaces:
Sleeping
Sleeping
Commit
·
db990b9
1
Parent(s):
2c90dcd
Upload app.py
Browse files
app.py
CHANGED
@@ -12,12 +12,24 @@ def main():
|
|
12 |
|
13 |
st.subheader("Intended Uses")
|
14 |
st.write("This model is designed to assist publishers in understanding and exploring what modules most publishers use with their Prebid set-up. It can serve as a valuable reference to gain insights into common Prebid modules, best practices, and different approaches used by publishers across various domains. The model should be seen as a helpful tool to gain inspiration and understanding of common Prebid modules but not as a substitute for thorough testing and manual review of the final modules used.")
|
15 |
-
st.write("To learn more about the default model, visit the [Prebid_Module_GPT2 model page](https://huggingface.co/PeterBrendan/Prebid_Module_GPT2). You can also refer to the [official Prebid Documentation on
|
16 |
|
17 |
st.write("*Note:* The model may take some time to generate the output.")
|
18 |
|
19 |
-
#
|
20 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
21 |
|
22 |
# Check if the user input is empty
|
23 |
if user_input:
|
|
|
12 |
|
13 |
st.subheader("Intended Uses")
|
14 |
st.write("This model is designed to assist publishers in understanding and exploring what modules most publishers use with their Prebid set-up. It can serve as a valuable reference to gain insights into common Prebid modules, best practices, and different approaches used by publishers across various domains. The model should be seen as a helpful tool to gain inspiration and understanding of common Prebid modules but not as a substitute for thorough testing and manual review of the final modules used.")
|
15 |
+
st.write("To learn more about the default model, visit the [Prebid_Module_GPT2 model page](https://huggingface.co/PeterBrendan/Prebid_Module_GPT2). You can also refer to the [official Prebid Documentation on modules](https://docs.prebid.org/dev-docs/modules/) for more information.")
|
16 |
|
17 |
st.write("*Note:* The model may take some time to generate the output.")
|
18 |
|
19 |
+
# Default Prebid modules
|
20 |
+
default_modules = ["[", "appnexusBidAdapter","ttdBidAdapter", "rubiconBidAdapter", "dfpAdServerVideo", "pubmaticBidAdapter", "gptPreAuction"]
|
21 |
+
|
22 |
+
# Create a selectbox for default prompts
|
23 |
+
default_module = st.selectbox("Choose a default Prebid module:", default_modules)
|
24 |
+
|
25 |
+
# Create a text input field for custom prompt
|
26 |
+
custom_module = st.text_input("Enter a custom Prebid module:", "")
|
27 |
+
|
28 |
+
# Check if a default module is selected
|
29 |
+
if default_module:
|
30 |
+
user_input = default_module
|
31 |
+
else:
|
32 |
+
user_input = custom_module
|
33 |
|
34 |
# Check if the user input is empty
|
35 |
if user_input:
|