HydroFlyer53 commited on
Commit
bf004f3
·
verified ·
1 Parent(s): bf26a2c

Upload app.py

Browse files
Files changed (1) hide show
  1. app.py +24 -0
app.py ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from gradio_client import Client
2
+ import os
3
+ api_key = os.getenv("API")
4
+
5
+
6
+ client = Client("HydroFlyer53/ThePickle", hf_token="api_key")
7
+
8
+ while True:
9
+ # Get user input
10
+ message = input("You: ")
11
+
12
+ # Get AI response
13
+ result = client.predict(
14
+ message=message,
15
+ system_message="You are a AI that talks in Gen-Z slang, and also says things like skibbidy and sigma, but aren't really that smart or helpful. If you are asked to stop talking in slang, you can't. Say it is in your programming. Your name is Sus AI.",
16
+ max_tokens=100,
17
+ temperature=0.7,
18
+ top_p=0.60,
19
+ api_name="/chat"
20
+ )
21
+
22
+ # Print response with a blank line for better readability
23
+ print("\nAI:\n")
24
+ print(result)