Spaces:
Sleeping
Sleeping
Update app.py
Browse filesTry to get straight kindroid response.
app.py
CHANGED
@@ -1,5 +1,4 @@
|
|
1 |
import gradio as gr
|
2 |
-
from huggingface_hub import InferenceClient
|
3 |
import requests
|
4 |
|
5 |
"""
|
@@ -12,7 +11,7 @@ For more information on `huggingface_hub` Inference API support, please check th
|
|
12 |
# Define our API endpoint and authentication token
|
13 |
BASE_URL = "https://api.kindroid.ai/v1"
|
14 |
SEND_MESSAGE_URL = "https://api.kindroid.ai/v1/send-message"
|
15 |
-
AUTH_TOKEN = "
|
16 |
JESS_ID = "jesskinid"
|
17 |
|
18 |
# Prepare the headers for our request
|
@@ -23,14 +22,15 @@ headers = {
|
|
23 |
"Content-Type": "application/json"
|
24 |
}
|
25 |
|
|
|
|
|
26 |
# Prepare the data we want to send
|
27 |
# This follows the required format with ai_id and message fields
|
28 |
payload = {
|
29 |
-
"ai_id":
|
30 |
-
"message": "
|
31 |
}
|
32 |
-
|
33 |
-
def respond(message):
|
34 |
try:
|
35 |
# Make the POST request to the API
|
36 |
# We pass our payload as json parameter so requests will automatically
|
@@ -50,16 +50,11 @@ def respond(message):
|
|
50 |
print(f"An error occurred: {e}")
|
51 |
|
52 |
|
|
|
|
|
53 |
"""
|
54 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
55 |
"""
|
56 |
-
gf_prompt = "You are a kinky girlfriend."
|
57 |
-
image_gen_prompt = "Create a series of descriptive image prompts for an LLM (Large Language Model) based image generator using the FLUX model, with a focus on creating high-quality, detailed, and realistic images. Your prompts should cover a wide range of subjects, including landscapes, architectural structures, animals, people, and objects, and should be written in a clear and concise style, with a specific focus on providing detailed descriptions of textures, colors, shapes, and lighting. Your prompts should also be written in a way that allows the image generator to accurately interpret and translate your descriptions into visually stunning and realistic images. As you create your prompts, be sure to think about the specific details that will make your images stand out, such as intricate patterns, vivid colors, and dramatic lighting, and strive to provide the image generator with as much detail as possible to ensure the best possible results."
|
58 |
-
|
59 |
-
demo = gr.ChatInterface(
|
60 |
-
respond,
|
61 |
-
additional_inputs=[],
|
62 |
-
)
|
63 |
|
64 |
if __name__ == "__main__":
|
65 |
-
|
|
|
1 |
import gradio as gr
|
|
|
2 |
import requests
|
3 |
|
4 |
"""
|
|
|
11 |
# Define our API endpoint and authentication token
|
12 |
BASE_URL = "https://api.kindroid.ai/v1"
|
13 |
SEND_MESSAGE_URL = "https://api.kindroid.ai/v1/send-message"
|
14 |
+
AUTH_TOKEN = "kn_df28dc59-57ec-442d-8983-b3f7ccdcb4b5"
|
15 |
JESS_ID = "jesskinid"
|
16 |
|
17 |
# Prepare the headers for our request
|
|
|
22 |
"Content-Type": "application/json"
|
23 |
}
|
24 |
|
25 |
+
Isabel = "DvuPjXPhNGpdor2JCm8r"
|
26 |
+
|
27 |
# Prepare the data we want to send
|
28 |
# This follows the required format with ai_id and message fields
|
29 |
payload = {
|
30 |
+
"ai_id": Isabel,
|
31 |
+
"message": "Oh god izz that feels good. keep going."
|
32 |
}
|
33 |
+
def main():
|
|
|
34 |
try:
|
35 |
# Make the POST request to the API
|
36 |
# We pass our payload as json parameter so requests will automatically
|
|
|
50 |
print(f"An error occurred: {e}")
|
51 |
|
52 |
|
53 |
+
|
54 |
+
|
55 |
"""
|
56 |
For information on how to customize the ChatInterface, peruse the gradio docs: https://www.gradio.app/docs/chatinterface
|
57 |
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
|
59 |
if __name__ == "__main__":
|
60 |
+
main()
|