Spaces:
Sleeping
Sleeping
veeps
commited on
Commit
•
689666c
1
Parent(s):
1e1d93b
removing chat if statement
Browse files
app.py
CHANGED
@@ -66,12 +66,12 @@ def chat_with_gpt(prompt):
|
|
66 |
|
67 |
return response.choices[0].message.content.strip()
|
68 |
|
69 |
-
if __name__ == "__main__":
|
70 |
-
while True:
|
71 |
-
user_input = input("You: ")
|
72 |
-
if user_input.lower() in ["quit", "exit", "bye"]:
|
73 |
-
break
|
74 |
-
response = chat_with_gpt(user_input)
|
75 |
#print("Chatbot: ", response)
|
76 |
-
|
77 |
-
|
|
|
66 |
|
67 |
return response.choices[0].message.content.strip()
|
68 |
|
69 |
+
#if __name__ == "__main__":
|
70 |
+
# while True:
|
71 |
+
# user_input = input("You: ")
|
72 |
+
# if user_input.lower() in ["quit", "exit", "bye"]:
|
73 |
+
# break
|
74 |
+
# response = chat_with_gpt(user_input)
|
75 |
#print("Chatbot: ", response)
|
76 |
+
demo = gradio.Interface(fn=chat_with_gpt, inputs = "text", outputs = "text", title = "Your Voter Guide" )
|
77 |
+
demo. launch(share =True)
|