Spaces:
Runtime error
Runtime error
Hjgugugjhuhjggg
commited on
Commit
•
66fb7b1
1
Parent(s):
c700885
Update app.py
Browse files
app.py
CHANGED
@@ -259,8 +259,8 @@ def generate_model_response(model, inputs):
|
|
259 |
def remove_repetitive_responses(responses):
|
260 |
unique_responses = {}
|
261 |
for response in responses:
|
262 |
-
if response
|
263 |
-
unique_responses[response
|
264 |
return unique_responses
|
265 |
|
266 |
async def process_message(message):
|
@@ -302,4 +302,4 @@ iface = gr.Interface(
|
|
302 |
|
303 |
if __name__ == "__main__":
|
304 |
port = int(os.environ.get("PORT", 7860))
|
305 |
-
iface.launch(server_port=port)
|
|
|
259 |
def remove_repetitive_responses(responses):
|
260 |
unique_responses = {}
|
261 |
for response in responses:
|
262 |
+
if response not in unique_responses:
|
263 |
+
unique_responses[response] = response
|
264 |
return unique_responses
|
265 |
|
266 |
async def process_message(message):
|
|
|
302 |
|
303 |
if __name__ == "__main__":
|
304 |
port = int(os.environ.get("PORT", 7860))
|
305 |
+
iface.launch(server_port=port, share=True)
|