mgokg commited on
Commit
d7b5b8e
·
verified ·
1 Parent(s): 42c1aff

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -9
app.py CHANGED
@@ -7,17 +7,10 @@ import threading
7
 
8
  app = FastAPI()
9
 
10
- origins = [
11
- "http://localhost",
12
- "http://localhost:8000",
13
- "https://try.w3schools.com",
14
- ]
15
-
16
-
17
  # Erlaube alle Ursprünge
18
  app.add_middleware(
19
  CORSMiddleware,
20
- allow_origins=origins,
21
  allow_credentials=True,
22
  allow_methods=["*"],
23
  allow_headers=["*"],
@@ -41,7 +34,7 @@ prompt = ""
41
  def get_prompt():
42
  return prompt
43
 
44
- gr_interface = gr.Interface(fn=get_prompt, inputs="text", outputs="text", live=True)
45
 
46
  def start_gradio():
47
  gr_interface.launch()
 
7
 
8
  app = FastAPI()
9
 
 
 
 
 
 
 
 
10
  # Erlaube alle Ursprünge
11
  app.add_middleware(
12
  CORSMiddleware,
13
+ allow_origins=["*"],
14
  allow_credentials=True,
15
  allow_methods=["*"],
16
  allow_headers=["*"],
 
34
  def get_prompt():
35
  return prompt
36
 
37
+ gr_interface = gr.chatbot(fn=get_prompt, inputs="text", outputs="text", live=True)
38
 
39
  def start_gradio():
40
  gr_interface.launch()