freddyaboulton HF staff commited on
Commit
efb488d
·
verified ·
1 Parent(s): 9a23204

Commit 3: Add 28 file(s)

Browse files
Files changed (2) hide show
  1. requirements.txt +2 -2
  2. run.py +11 -2
requirements.txt CHANGED
@@ -1,5 +1,5 @@
1
- gradio-client @ git+https://github.com/gradio-app/gradio@44c488e45cb438148bccd13a0e8a57755d9706e8#subdirectory=client/python
2
- https://gradio-pypi-previews.s3.amazonaws.com/44c488e45cb438148bccd13a0e8a57755d9706e8/gradio-4.44.0-py3-none-any.whl
3
  pypistats==1.1.0
4
  plotly
5
  altair
 
1
+ gradio-client @ git+https://github.com/gradio-app/gradio@bd5686a0552117376a4f82f7244505093934f268#subdirectory=client/python
2
+ https://gradio-pypi-previews.s3.amazonaws.com/bd5686a0552117376a4f82f7244505093934f268/gradio-4.44.0-py3-none-any.whl
3
  pypistats==1.1.0
4
  plotly
5
  altair
run.py CHANGED
@@ -19,11 +19,20 @@ templates = Jinja2Templates(directory="templates")
19
 
20
  names = sorted(os.listdir("./demos"))
21
 
 
22
  @app.get("/")
23
  def index(request: Request):
24
  names = [[p[0], p[2]] for p in all_demos]
25
- return templates.TemplateResponse("index.html", {"request": request, "names": names,
26
- "initial_demo": names[0][0], "is_space": get_space()})
 
 
 
 
 
 
 
 
27
 
28
  all_demos = []
29
  demo_module = None
 
19
 
20
  names = sorted(os.listdir("./demos"))
21
 
22
+
23
  @app.get("/")
24
  def index(request: Request):
25
  names = [[p[0], p[2]] for p in all_demos]
26
+ return templates.TemplateResponse(
27
+ "index.html",
28
+ {
29
+ "request": request,
30
+ "names": names,
31
+ "initial_demo": names[0][0],
32
+ "is_space": get_space(),
33
+ },
34
+ )
35
+
36
 
37
  all_demos = []
38
  demo_module = None