Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -5,6 +5,7 @@ import re
|
|
5 |
import httpx
|
6 |
import asyncio
|
7 |
import gradio as gr
|
|
|
8 |
|
9 |
global_data = {
|
10 |
'models': {},
|
@@ -81,7 +82,6 @@ def remove_duplicates(text):
|
|
81 |
seen_lines.add(line)
|
82 |
return '\n'.join(unique_lines)
|
83 |
|
84 |
-
|
85 |
def generate_model_response(model, inputs):
|
86 |
try:
|
87 |
response = model(inputs)
|
@@ -126,4 +126,6 @@ iface = gr.Interface(
|
|
126 |
description="Enter a message and get responses from multiple LLMs.",
|
127 |
)
|
128 |
|
129 |
-
|
|
|
|
|
|
5 |
import httpx
|
6 |
import asyncio
|
7 |
import gradio as gr
|
8 |
+
import os
|
9 |
|
10 |
global_data = {
|
11 |
'models': {},
|
|
|
82 |
seen_lines.add(line)
|
83 |
return '\n'.join(unique_lines)
|
84 |
|
|
|
85 |
def generate_model_response(model, inputs):
|
86 |
try:
|
87 |
response = model(inputs)
|
|
|
126 |
description="Enter a message and get responses from multiple LLMs.",
|
127 |
)
|
128 |
|
129 |
+
if __name__ == "__main__":
|
130 |
+
port = int(os.environ.get("PORT", 7860))
|
131 |
+
iface.launch(server_port=port)
|