Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -1,13 +1,15 @@
|
|
1 |
-
"""SusAI ©2025 Intern Labs. v1.0.
|
2 |
import os
|
3 |
import gradio as gr
|
|
|
4 |
from gradio_client import Client
|
5 |
|
6 |
# Initialize Hugging Face Inference Client
|
7 |
-
client = Client("HydroFlyer53/ThePickle", hf_token=os.environ
|
8 |
|
9 |
def chat_with_ai(message, history):
|
10 |
"""Function to get AI response from Hugging Face model."""
|
|
|
11 |
result = client.predict(
|
12 |
message=message,
|
13 |
system_message=(
|
@@ -24,13 +26,8 @@ def chat_with_ai(message, history):
|
|
24 |
)
|
25 |
return result
|
26 |
|
27 |
-
|
28 |
-
return "SusAI ©2025 Intern Labs. v1.0.5"
|
29 |
-
|
30 |
demo = gr.ChatInterface(fn=chat_with_ai)
|
31 |
|
32 |
-
demo.chatbot.((startup_message(), None))
|
33 |
-
|
34 |
if __name__ == "__main__":
|
35 |
-
demo.launch()
|
36 |
-
|
|
|
1 |
+
"""SusAI ©2025 Intern Labs. v1.0.1"""
|
2 |
import os
|
3 |
import gradio as gr
|
4 |
+
|
5 |
from gradio_client import Client
|
6 |
|
7 |
# Initialize Hugging Face Inference Client
|
8 |
+
client = Client("HydroFlyer53/ThePickle", hf_token=os.environ.get("Key"))
|
9 |
|
10 |
def chat_with_ai(message, history):
|
11 |
"""Function to get AI response from Hugging Face model."""
|
12 |
+
|
13 |
result = client.predict(
|
14 |
message=message,
|
15 |
system_message=(
|
|
|
26 |
)
|
27 |
return result
|
28 |
|
29 |
+
# Gradio Chat Interface
|
|
|
|
|
30 |
demo = gr.ChatInterface(fn=chat_with_ai)
|
31 |
|
|
|
|
|
32 |
if __name__ == "__main__":
|
33 |
+
demo.launch()
|
|