Date: Sun, 12 Nov 2023 17:39:20 +0530
Subject: [PATCH 21/29] right align privacy and terms fix alignment of run cost
---
daras_ai_v2/base.py | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/daras_ai_v2/base.py b/daras_ai_v2/base.py
index 578c67e65..e74acc160 100644
--- a/daras_ai_v2/base.py
+++ b/daras_ai_v2/base.py
@@ -486,15 +486,11 @@ def render_submit_button(self, key="--submit-1"):
cost_note = f"({cost_note.strip()})"
st.caption(
f"""
-
- Run cost = {self.get_price_roundoff(st.session_state)} credits
- {cost_note}
-
+Run cost = {self.get_price_roundoff(st.session_state)} credits {cost_note}
+{self.additional_notes() or ""}
""",
unsafe_allow_html=True,
)
- if additional_notes := self.additional_notes():
- st.caption(additional_notes)
with col2:
submitted = st.button(
"🏃 Submit",
@@ -640,10 +636,11 @@ def _render_input_col(self):
st.text_input("Title", key=StateKeys.page_title)
st.text_area("Notes", key=StateKeys.page_notes)
submitted = self.render_submit_button()
- st.caption(
- "_By submitting, you agree to Gooey.AI's [terms](https://gooey.ai/terms) & "
- "[privacy policy](https://gooey.ai/privacy)._"
- )
+ with st.div(style={"textAlign": "right"}):
+ st.caption(
+ "_By submitting, you agree to Gooey.AI's [terms](https://gooey.ai/terms) & "
+ "[privacy policy](https://gooey.ai/privacy)._"
+ )
return submitted
def _render_output_col(self, submitted: bool):
From 27dccaa6f96ce0b81fe3ebcfe89581a24a23177f Mon Sep 17 00:00:00 2001
From: Kaustubh Maske Patil <37668193+nikochiko@users.noreply.github.com>
Date: Wed, 8 Nov 2023 20:17:57 +0530
Subject: [PATCH 22/29] move t&c out of sticky container
---
daras_ai_v2/base.py | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/daras_ai_v2/base.py b/daras_ai_v2/base.py
index 4c8af2d8f..21e61e076 100644
--- a/daras_ai_v2/base.py
+++ b/daras_ai_v2/base.py
@@ -479,10 +479,12 @@ def render_submit_button(self, key="--submit-1"):
col2.node.props[
"className"
] += " d-flex justify-content-end align-items-center"
+ col1.node.props[
+ "className"
+ ] += " d-flex flex-column justify-content-center"
with col1:
st.caption(
- f"Run cost = [{self.get_price_roundoff(st.session_state)} credits]({self.get_credits_click_url()}) \\\n"
- f"_By submitting, you agree to Gooey.AI's [terms](https://gooey.ai/terms) & [privacy policy](https://gooey.ai/privacy)._ ",
+ f"Run cost = [{self.get_price_roundoff(st.session_state)} credits]({self.get_credits_click_url()})"
)
additional_notes = self.additional_notes()
if additional_notes:
@@ -632,6 +634,10 @@ def _render_input_col(self):
st.text_input("Title", key=StateKeys.page_title)
st.text_area("Notes", key=StateKeys.page_notes)
submitted = self.render_submit_button()
+ st.caption(
+ "_By submitting, you agree to Gooey.AI's [terms](https://gooey.ai/terms) &"
+ "[privacy policy](https://gooey.ai/privacy)._"
+ )
return submitted
def _render_output_col(self, submitted: bool):
From b851c777575d55b1c5a96e2e2c63713b5c21b127 Mon Sep 17 00:00:00 2001
From: Kaustubh Maske Patil <37668193+nikochiko@users.noreply.github.com>
Date: Wed, 8 Nov 2023 20:41:47 +0530
Subject: [PATCH 23/29] run black formatter
---
daras_ai_v2/base.py | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/daras_ai_v2/base.py b/daras_ai_v2/base.py
index 21e61e076..86c7bfd6a 100644
--- a/daras_ai_v2/base.py
+++ b/daras_ai_v2/base.py
@@ -479,9 +479,7 @@ def render_submit_button(self, key="--submit-1"):
col2.node.props[
"className"
] += " d-flex justify-content-end align-items-center"
- col1.node.props[
- "className"
- ] += " d-flex flex-column justify-content-center"
+ col1.node.props["className"] += " d-flex flex-column justify-content-center"
with col1:
st.caption(
f"Run cost = [{self.get_price_roundoff(st.session_state)} credits]({self.get_credits_click_url()})"
From f08ce1d02ca9721a98fadf52fac81908c9998ea0 Mon Sep 17 00:00:00 2001
From: Kaustubh Maske Patil <37668193+nikochiko@users.noreply.github.com>
Date: Wed, 8 Nov 2023 21:20:39 +0530
Subject: [PATCH 24/29] Add cost note for presenting text in parens after
showing run cost
---
daras_ai_v2/base.py | 9 ++++++++-
recipes/DeforumSD.py | 8 ++++----
recipes/Lipsync.py | 6 ++----
recipes/LipsyncTTS.py | 22 ++++++++++++++--------
recipes/TextToSpeech.py | 6 +++---
recipes/asr.py | 6 ++----
6 files changed, 33 insertions(+), 24 deletions(-)
diff --git a/daras_ai_v2/base.py b/daras_ai_v2/base.py
index 86c7bfd6a..13c3ee662 100644
--- a/daras_ai_v2/base.py
+++ b/daras_ai_v2/base.py
@@ -481,8 +481,12 @@ def render_submit_button(self, key="--submit-1"):
] += " d-flex justify-content-end align-items-center"
col1.node.props["className"] += " d-flex flex-column justify-content-center"
with col1:
+ cost_note = self.get_cost_note() or ""
+ if cost_note:
+ cost_note = f"({cost_note.strip()})"
st.caption(
f"Run cost = [{self.get_price_roundoff(st.session_state)} credits]({self.get_credits_click_url()})"
+ f" {cost_note}"
)
additional_notes = self.additional_notes()
if additional_notes:
@@ -633,7 +637,7 @@ def _render_input_col(self):
st.text_area("Notes", key=StateKeys.page_notes)
submitted = self.render_submit_button()
st.caption(
- "_By submitting, you agree to Gooey.AI's [terms](https://gooey.ai/terms) &"
+ "_By submitting, you agree to Gooey.AI's [terms](https://gooey.ai/terms) & "
"[privacy policy](https://gooey.ai/privacy)._"
)
return submitted
@@ -1145,6 +1149,9 @@ def get_example_response_body(
def additional_notes(self) -> str | None:
pass
+ def get_cost_note(self) -> str | None:
+ pass
+
def is_current_user_admin(self) -> bool:
if not self.request or not self.request.user:
return False
diff --git a/recipes/DeforumSD.py b/recipes/DeforumSD.py
index c2ebd231c..b5ab1c327 100644
--- a/recipes/DeforumSD.py
+++ b/recipes/DeforumSD.py
@@ -229,11 +229,11 @@ def render_form_v2(self):
"""
)
+ def get_cost_note(self) -> str | None:
+ return f"{CREDITS_PER_FRAME} / frame"
+
def additional_notes(self) -> str | None:
- return f"""
-*Cost ≈ {CREDITS_PER_FRAME} credits per frame* \\
-*Process Run Time ≈ 5 seconds per frame*
- """
+ return "Render Time ≈ 3s / frame"
def get_raw_price(self, state: dict) -> float:
max_frames = state.get("max_frames", 100) or 0
diff --git a/recipes/Lipsync.py b/recipes/Lipsync.py
index 44e2af76f..68ac496a0 100644
--- a/recipes/Lipsync.py
+++ b/recipes/Lipsync.py
@@ -126,10 +126,8 @@ def render_usage_guide(self):
def preview_description(self, state: dict) -> str:
return "Create high-quality, realistic Lipsync animations from any audio file. Input a sample face gif/video + audio and we will automatically generate a lipsync animation that matches your audio."
- def additional_notes(self) -> str | None:
- return f"""
- *Cost ≈ {CREDITS_PER_MB} credits per MB*
- """
+ def get_cost_note(self) -> str | None:
+ return f"{CREDITS_PER_MB} credits per MB"
def get_raw_price(self, state: dict) -> float:
total_bytes = 0
diff --git a/recipes/LipsyncTTS.py b/recipes/LipsyncTTS.py
index cc900c0c1..132872bf0 100644
--- a/recipes/LipsyncTTS.py
+++ b/recipes/LipsyncTTS.py
@@ -169,15 +169,21 @@ def get_raw_price(self, state: dict):
else:
return LipsyncPage.get_raw_price(self, state)
+ def get_cost_note(self):
+ return "Lipsync cost + TTS cost"
+
def additional_notes(self):
- lipsync_notes = LipsyncPage.additional_notes(self)
- if tts_notes := TextToSpeechPage.additional_notes(self):
- notes = f"""
- - *Lipsync* {lipsync_notes.strip()}
- - *TTS* {tts_notes.strip()}
- """
- else:
- notes = lipsync_notes
+ cost_notes = {
+ "Lipsync": LipsyncPage.get_cost_note(self),
+ "TTS": TextToSpeechPage.get_cost_note(self),
+ }
+ notes = "\n".join([
+ f"- *{k} cost: {v.strip()}*" if v else ""
+ for k, v in cost_notes.items()
+ ])
+
+ notes += LipsyncPage.additional_notes(self) or ""
+ notes += TextToSpeechPage.additional_notes(self) or ""
return notes
diff --git a/recipes/TextToSpeech.py b/recipes/TextToSpeech.py
index dfa5da82b..0df5d1d3d 100644
--- a/recipes/TextToSpeech.py
+++ b/recipes/TextToSpeech.py
@@ -148,14 +148,14 @@ def _get_tts_provider(self, state: dict):
# TODO: validate tts_provider before lookup?
return TextToSpeechProviders[tts_provider]
- def additional_notes(self):
+ def get_cost_note(self):
tts_provider = st.session_state.get("tts_provider")
if tts_provider == TextToSpeechProviders.ELEVEN_LABS.name:
_, is_user_provided_key = self._get_elevenlabs_api_key(st.session_state)
if is_user_provided_key:
- return "*Eleven Labs cost ≈ No additional credit charge given we'll use your API key*"
+ return "*Eleven Labs ≈ No additional credit charge given we'll use your API key*"
else:
- return "*Eleven Labs cost ≈ 4 credits per 10 words*"
+ return "*Eleven Labs ≈ 4 credits per 10 words*"
else:
return ""
diff --git a/recipes/asr.py b/recipes/asr.py
index a11f4c762..3798683fa 100644
--- a/recipes/asr.py
+++ b/recipes/asr.py
@@ -169,10 +169,8 @@ def run(self, state: dict):
# Save the raw ASR text for details view
state["output_text"] = asr_output
- def additional_notes(self) -> str | None:
- return """
-*Cost ≈ 1 credit for 12.5 words ≈ 0.08 credits per word*
- """
+ def get_cost_note(self) -> str | None:
+ return "1 credit for 12.5 words ≈ 0.08 per word"
def get_raw_price(self, state: dict):
texts = state.get("output_text", [])
From 754d547f6e896a1bee0e83463514bba3f08b6123 Mon Sep 17 00:00:00 2001
From: Kaustubh Maske Patil <37668193+nikochiko@users.noreply.github.com>
Date: Wed, 8 Nov 2023 21:24:55 +0530
Subject: [PATCH 25/29] fix linting
---
recipes/LipsyncTTS.py | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/recipes/LipsyncTTS.py b/recipes/LipsyncTTS.py
index 132872bf0..5a1eb10d4 100644
--- a/recipes/LipsyncTTS.py
+++ b/recipes/LipsyncTTS.py
@@ -177,10 +177,9 @@ def additional_notes(self):
"Lipsync": LipsyncPage.get_cost_note(self),
"TTS": TextToSpeechPage.get_cost_note(self),
}
- notes = "\n".join([
- f"- *{k} cost: {v.strip()}*" if v else ""
- for k, v in cost_notes.items()
- ])
+ notes = "\n".join(
+ [f"- *{k} cost: {v.strip()}*" if v else "" for k, v in cost_notes.items()]
+ )
notes += LipsyncPage.additional_notes(self) or ""
notes += TextToSpeechPage.additional_notes(self) or ""
From 0c1876e3ac428dc7e5eab08a1b8fb77f0ee7dcf8 Mon Sep 17 00:00:00 2001
From: Kaustubh Maske Patil <37668193+nikochiko@users.noreply.github.com>
Date: Thu, 9 Nov 2023 18:16:35 +0530
Subject: [PATCH 26/29] Make zero-margin for caption in sticky submit section
---
daras_ai_v2/base.py | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/daras_ai_v2/base.py b/daras_ai_v2/base.py
index 13c3ee662..c88247364 100644
--- a/daras_ai_v2/base.py
+++ b/daras_ai_v2/base.py
@@ -485,11 +485,15 @@ def render_submit_button(self, key="--submit-1"):
if cost_note:
cost_note = f"({cost_note.strip()})"
st.caption(
- f"Run cost = [{self.get_price_roundoff(st.session_state)} credits]({self.get_credits_click_url()})"
- f" {cost_note}"
+ f"""
+
+ Run cost = {self.get_price_roundoff(st.session_state)} credits
+ {cost_note}
+
+ """,
+ unsafe_allow_html=True,
)
- additional_notes = self.additional_notes()
- if additional_notes:
+ if additional_notes := self.additional_notes():
st.caption(additional_notes)
with col2:
submitted = st.button(
From 52d17594b469aa4ade270701777585c74f8b626f Mon Sep 17 00:00:00 2001
From: Dev Aggarwal
Date: Sun, 12 Nov 2023 17:39:20 +0530
Subject: [PATCH 27/29] right align privacy and terms fix alignment of run cost
---
daras_ai_v2/base.py | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/daras_ai_v2/base.py b/daras_ai_v2/base.py
index c88247364..b306cf626 100644
--- a/daras_ai_v2/base.py
+++ b/daras_ai_v2/base.py
@@ -486,15 +486,11 @@ def render_submit_button(self, key="--submit-1"):
cost_note = f"({cost_note.strip()})"
st.caption(
f"""
-
- Run cost = {self.get_price_roundoff(st.session_state)} credits
- {cost_note}
-
+Run cost = {self.get_price_roundoff(st.session_state)} credits {cost_note}
+{self.additional_notes() or ""}
""",
unsafe_allow_html=True,
)
- if additional_notes := self.additional_notes():
- st.caption(additional_notes)
with col2:
submitted = st.button(
"🏃 Submit",
@@ -640,10 +636,11 @@ def _render_input_col(self):
st.text_input("Title", key=StateKeys.page_title)
st.text_area("Notes", key=StateKeys.page_notes)
submitted = self.render_submit_button()
- st.caption(
- "_By submitting, you agree to Gooey.AI's [terms](https://gooey.ai/terms) & "
- "[privacy policy](https://gooey.ai/privacy)._"
- )
+ with st.div(style={"textAlign": "right"}):
+ st.caption(
+ "_By submitting, you agree to Gooey.AI's [terms](https://gooey.ai/terms) & "
+ "[privacy policy](https://gooey.ai/privacy)._"
+ )
return submitted
def _render_output_col(self, submitted: bool):
From eaececfb927705d21d1be2d3cdf087c3b2e32565 Mon Sep 17 00:00:00 2001
From: Dev Aggarwal
Date: Sun, 12 Nov 2023 21:09:50 +0530
Subject: [PATCH 28/29] add index for savedrun
---
...lance_alter_appuser_created_at_and_more.py | 38 +++++++++++++++++++
...bots_savedr_created_cb8e09_idx_and_more.py | 24 ++++++++++++
bots/models.py | 2 +
3 files changed, 64 insertions(+)
create mode 100644 app_users/migrations/0010_alter_appuser_balance_alter_appuser_created_at_and_more.py
create mode 100644 bots/migrations/0046_savedrun_bots_savedr_created_cb8e09_idx_and_more.py
diff --git a/app_users/migrations/0010_alter_appuser_balance_alter_appuser_created_at_and_more.py b/app_users/migrations/0010_alter_appuser_balance_alter_appuser_created_at_and_more.py
new file mode 100644
index 000000000..fc8b7f401
--- /dev/null
+++ b/app_users/migrations/0010_alter_appuser_balance_alter_appuser_created_at_and_more.py
@@ -0,0 +1,38 @@
+# Generated by Django 4.2.5 on 2023-11-12 15:40
+
+from django.db import migrations, models
+import django.utils.timezone
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("app_users", "0009_alter_appusertransaction_options_and_more"),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name="appuser",
+ name="balance",
+ field=models.IntegerField(verbose_name="bal"),
+ ),
+ migrations.AlterField(
+ model_name="appuser",
+ name="created_at",
+ field=models.DateTimeField(
+ blank=True,
+ default=django.utils.timezone.now,
+ editable=False,
+ verbose_name="created",
+ ),
+ ),
+ migrations.AlterField(
+ model_name="appuser",
+ name="display_name",
+ field=models.TextField(blank=True, verbose_name="name"),
+ ),
+ migrations.AlterField(
+ model_name="appuser",
+ name="is_paying",
+ field=models.BooleanField(default=False, verbose_name="paid"),
+ ),
+ ]
diff --git a/bots/migrations/0046_savedrun_bots_savedr_created_cb8e09_idx_and_more.py b/bots/migrations/0046_savedrun_bots_savedr_created_cb8e09_idx_and_more.py
new file mode 100644
index 000000000..ff6fb4d97
--- /dev/null
+++ b/bots/migrations/0046_savedrun_bots_savedr_created_cb8e09_idx_and_more.py
@@ -0,0 +1,24 @@
+# Generated by Django 4.2.5 on 2023-11-12 15:40
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+ dependencies = [
+ ("bots", "0045_savedrun_transaction"),
+ ]
+
+ operations = [
+ migrations.AddIndex(
+ model_name="savedrun",
+ index=models.Index(
+ fields=["-created_at"], name="bots_savedr_created_cb8e09_idx"
+ ),
+ ),
+ migrations.AddIndex(
+ model_name="savedrun",
+ index=models.Index(
+ fields=["-updated_at"], name="bots_savedr_updated_a6c854_idx"
+ ),
+ ),
+ ]
diff --git a/bots/models.py b/bots/models.py
index b527cd998..937f26e70 100644
--- a/bots/models.py
+++ b/bots/models.py
@@ -170,6 +170,8 @@ class Meta:
),
]
indexes = [
+ models.Index(fields=["-created_at"]),
+ models.Index(fields=["-updated_at"]),
models.Index(fields=["workflow"]),
models.Index(fields=["workflow", "run_id", "uid"]),
models.Index(fields=["workflow", "example_id", "run_id", "uid"]),
From b849a6fa7a056502669199be285c65c1812dea48 Mon Sep 17 00:00:00 2001
From: Sean Blagsvedt
Date: Mon, 13 Nov 2023 15:40:45 -0800
Subject: [PATCH 29/29] Create LICENSE
---
LICENSE | 201 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 201 insertions(+)
create mode 100644 LICENSE
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 000000000..261eeb9e9
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,201 @@
+ Apache License
+ Version 2.0, January 2004
+ http://www.apache.org/licenses/
+
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+ 1. Definitions.
+
+ "License" shall mean the terms and conditions for use, reproduction,
+ and distribution as defined by Sections 1 through 9 of this document.
+
+ "Licensor" shall mean the copyright owner or entity authorized by
+ the copyright owner that is granting the License.
+
+ "Legal Entity" shall mean the union of the acting entity and all
+ other entities that control, are controlled by, or are under common
+ control with that entity. For the purposes of this definition,
+ "control" means (i) the power, direct or indirect, to cause the
+ direction or management of such entity, whether by contract or
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
+ outstanding shares, or (iii) beneficial ownership of such entity.
+
+ "You" (or "Your") shall mean an individual or Legal Entity
+ exercising permissions granted by this License.
+
+ "Source" form shall mean the preferred form for making modifications,
+ including but not limited to software source code, documentation
+ source, and configuration files.
+
+ "Object" form shall mean any form resulting from mechanical
+ transformation or translation of a Source form, including but
+ not limited to compiled object code, generated documentation,
+ and conversions to other media types.
+
+ "Work" shall mean the work of authorship, whether in Source or
+ Object form, made available under the License, as indicated by a
+ copyright notice that is included in or attached to the work
+ (an example is provided in the Appendix below).
+
+ "Derivative Works" shall mean any work, whether in Source or Object
+ form, that is based on (or derived from) the Work and for which the
+ editorial revisions, annotations, elaborations, or other modifications
+ represent, as a whole, an original work of authorship. For the purposes
+ of this License, Derivative Works shall not include works that remain
+ separable from, or merely link (or bind by name) to the interfaces of,
+ the Work and Derivative Works thereof.
+
+ "Contribution" shall mean any work of authorship, including
+ the original version of the Work and any modifications or additions
+ to that Work or Derivative Works thereof, that is intentionally
+ submitted to Licensor for inclusion in the Work by the copyright owner
+ or by an individual or Legal Entity authorized to submit on behalf of
+ the copyright owner. For the purposes of this definition, "submitted"
+ means any form of electronic, verbal, or written communication sent
+ to the Licensor or its representatives, including but not limited to
+ communication on electronic mailing lists, source code control systems,
+ and issue tracking systems that are managed by, or on behalf of, the
+ Licensor for the purpose of discussing and improving the Work, but
+ excluding communication that is conspicuously marked or otherwise
+ designated in writing by the copyright owner as "Not a Contribution."
+
+ "Contributor" shall mean Licensor and any individual or Legal Entity
+ on behalf of whom a Contribution has been received by Licensor and
+ subsequently incorporated within the Work.
+
+ 2. Grant of Copyright License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ copyright license to reproduce, prepare Derivative Works of,
+ publicly display, publicly perform, sublicense, and distribute the
+ Work and such Derivative Works in Source or Object form.
+
+ 3. Grant of Patent License. Subject to the terms and conditions of
+ this License, each Contributor hereby grants to You a perpetual,
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+ (except as stated in this section) patent license to make, have made,
+ use, offer to sell, sell, import, and otherwise transfer the Work,
+ where such license applies only to those patent claims licensable
+ by such Contributor that are necessarily infringed by their
+ Contribution(s) alone or by combination of their Contribution(s)
+ with the Work to which such Contribution(s) was submitted. If You
+ institute patent litigation against any entity (including a
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
+ or a Contribution incorporated within the Work constitutes direct
+ or contributory patent infringement, then any patent licenses
+ granted to You under this License for that Work shall terminate
+ as of the date such litigation is filed.
+
+ 4. Redistribution. You may reproduce and distribute copies of the
+ Work or Derivative Works thereof in any medium, with or without
+ modifications, and in Source or Object form, provided that You
+ meet the following conditions:
+
+ (a) You must give any other recipients of the Work or
+ Derivative Works a copy of this License; and
+
+ (b) You must cause any modified files to carry prominent notices
+ stating that You changed the files; and
+
+ (c) You must retain, in the Source form of any Derivative Works
+ that You distribute, all copyright, patent, trademark, and
+ attribution notices from the Source form of the Work,
+ excluding those notices that do not pertain to any part of
+ the Derivative Works; and
+
+ (d) If the Work includes a "NOTICE" text file as part of its
+ distribution, then any Derivative Works that You distribute must
+ include a readable copy of the attribution notices contained
+ within such NOTICE file, excluding those notices that do not
+ pertain to any part of the Derivative Works, in at least one
+ of the following places: within a NOTICE text file distributed
+ as part of the Derivative Works; within the Source form or
+ documentation, if provided along with the Derivative Works; or,
+ within a display generated by the Derivative Works, if and
+ wherever such third-party notices normally appear. The contents
+ of the NOTICE file are for informational purposes only and
+ do not modify the License. You may add Your own attribution
+ notices within Derivative Works that You distribute, alongside
+ or as an addendum to the NOTICE text from the Work, provided
+ that such additional attribution notices cannot be construed
+ as modifying the License.
+
+ You may add Your own copyright statement to Your modifications and
+ may provide additional or different license terms and conditions
+ for use, reproduction, or distribution of Your modifications, or
+ for any such Derivative Works as a whole, provided Your use,
+ reproduction, and distribution of the Work otherwise complies with
+ the conditions stated in this License.
+
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
+ any Contribution intentionally submitted for inclusion in the Work
+ by You to the Licensor shall be under the terms and conditions of
+ this License, without any additional terms or conditions.
+ Notwithstanding the above, nothing herein shall supersede or modify
+ the terms of any separate license agreement you may have executed
+ with Licensor regarding such Contributions.
+
+ 6. Trademarks. This License does not grant permission to use the trade
+ names, trademarks, service marks, or product names of the Licensor,
+ except as required for reasonable and customary use in describing the
+ origin of the Work and reproducing the content of the NOTICE file.
+
+ 7. Disclaimer of Warranty. Unless required by applicable law or
+ agreed to in writing, Licensor provides the Work (and each
+ Contributor provides its Contributions) on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+ implied, including, without limitation, any warranties or conditions
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+ PARTICULAR PURPOSE. You are solely responsible for determining the
+ appropriateness of using or redistributing the Work and assume any
+ risks associated with Your exercise of permissions under this License.
+
+ 8. Limitation of Liability. In no event and under no legal theory,
+ whether in tort (including negligence), contract, or otherwise,
+ unless required by applicable law (such as deliberate and grossly
+ negligent acts) or agreed to in writing, shall any Contributor be
+ liable to You for damages, including any direct, indirect, special,
+ incidental, or consequential damages of any character arising as a
+ result of this License or out of the use or inability to use the
+ Work (including but not limited to damages for loss of goodwill,
+ work stoppage, computer failure or malfunction, or any and all
+ other commercial damages or losses), even if such Contributor
+ has been advised of the possibility of such damages.
+
+ 9. Accepting Warranty or Additional Liability. While redistributing
+ the Work or Derivative Works thereof, You may choose to offer,
+ and charge a fee for, acceptance of support, warranty, indemnity,
+ or other liability obligations and/or rights consistent with this
+ License. However, in accepting such obligations, You may act only
+ on Your own behalf and on Your sole responsibility, not on behalf
+ of any other Contributor, and only if You agree to indemnify,
+ defend, and hold each Contributor harmless for any liability
+ incurred by, or claims asserted against, such Contributor by reason
+ of your accepting any such warranty or additional liability.
+
+ END OF TERMS AND CONDITIONS
+
+ APPENDIX: How to apply the Apache License to your work.
+
+ To apply the Apache License to your work, attach the following
+ boilerplate notice, with the fields enclosed by brackets "[]"
+ replaced with your own identifying information. (Don't include
+ the brackets!) The text should be enclosed in the appropriate
+ comment syntax for the file format. We also recommend that a
+ file or class name and description of purpose be included on the
+ same "printed page" as the copyright notice for easier
+ identification within third-party archives.
+
+ Copyright [yyyy] [name of copyright owner]
+
+ Licensed under the Apache License, Version 2.0 (the "License");
+ you may not use this file except in compliance with the License.
+ You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+ Unless required by applicable law or agreed to in writing, software
+ distributed under the License is distributed on an "AS IS" BASIS,
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ See the License for the specific language governing permissions and
+ limitations under the License.