Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -91,7 +91,7 @@ def remove_duplicates(text):
|
|
91 |
@spaces.GPU(queue=False, allow_gpu_memory=True, timeout=0, duration=0)
|
92 |
def generate_model_response(model, inputs):
|
93 |
try:
|
94 |
-
response = model(inputs
|
95 |
return remove_duplicates(response['choices'][0]['text'])
|
96 |
except Exception as e:
|
97 |
print(f"Error generating model response: {e}")
|
@@ -135,4 +135,4 @@ iface = gr.Interface(
|
|
135 |
|
136 |
if __name__ == "__main__":
|
137 |
port = int(os.environ.get("PORT", 7860))
|
138 |
-
iface.launch(server_port=port)
|
|
|
91 |
@spaces.GPU(queue=False, allow_gpu_memory=True, timeout=0, duration=0)
|
92 |
def generate_model_response(model, inputs):
|
93 |
try:
|
94 |
+
response = model(inputs)
|
95 |
return remove_duplicates(response['choices'][0]['text'])
|
96 |
except Exception as e:
|
97 |
print(f"Error generating model response: {e}")
|
|
|
135 |
|
136 |
if __name__ == "__main__":
|
137 |
port = int(os.environ.get("PORT", 7860))
|
138 |
+
iface.launch(server_port=port)
|