Spaces:
Sleeping
Sleeping
fix deploy ip
Browse files
app.py
CHANGED
@@ -33,14 +33,21 @@ def generate_response(chat_input: str, bot_message: str) -> Generator[str, str,
|
|
33 |
print("Error:", response.status_code, response.text)
|
34 |
return f"Error: {response.status_code}, {response.text}"
|
35 |
|
36 |
-
|
37 |
-
|
|
|
|
|
|
|
|
|
38 |
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
|
|
|
|
|
|
44 |
|
45 |
if __name__ == "__main__":
|
46 |
demo.launch(server_name = "0.0.0.0")
|
|
|
33 |
print("Error:", response.status_code, response.text)
|
34 |
return f"Error: {response.status_code}, {response.text}"
|
35 |
|
36 |
+
CSS ="""
|
37 |
+
.contain { display: flex; flex-direction: column; }
|
38 |
+
.gradio-container { height: 100vh !important; }
|
39 |
+
#component-0 { height: 100%; }
|
40 |
+
#chatbot { flex-grow: 1; overflow: auto;}
|
41 |
+
"""
|
42 |
|
43 |
+
with gr.Blocks() as demo:
|
44 |
+
chatbot = gr.Chatbot(elem_id="chatbot")
|
45 |
+
chatbot = gr.ChatInterface(
|
46 |
+
fn=generate_response,
|
47 |
+
title="AskmeAboutRAG Chat",
|
48 |
+
description="RAG model for asking about RAG",
|
49 |
+
chatbot=chatbot,
|
50 |
+
)
|
51 |
|
52 |
if __name__ == "__main__":
|
53 |
demo.launch(server_name = "0.0.0.0")
|