Skip to content
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ No changes to highlight.
## Full Changelog:
* Images in the chatbot component are now resized if they exceed a max width by [@abidlabs](https://github.com/abidlabs) in [PR 2748](https://github.com/gradio-app/gradio/pull/2748)
* Missing parameters have been added to `gr.Blocks().load()` by [@abidlabs](https://github.com/abidlabs) in [PR 2755](https://github.com/gradio-app/gradio/pull/2755)

* Redirect old links and fix broken ones by [@aliabd](https://github.com/aliabd) in [PR 2774](https://github.com/gradio-app/gradio/pull/2774)

## Contributors Shoutout:
No changes to highlight.
Expand Down Expand Up @@ -1183,7 +1183,7 @@ You can read more in the [Examples docs](https://gradio.app/docs/#examples) or t

### 6. Fixes to Audio Streaming

With PR [#1828]([PR 1828),](https://github.com/gradio-app/gradio/pull/1828),) we now hide the status loading animation, as well as remove the echo in streaming. Check out the [stream_audio](https://github.com/gradio-app/gradio/blob/main/demo/stream_audio/run.py) demo for more or read through our [Real Time Speech Recognition](https://gradio.app/real_time_speech_recognition/) guide.
With [PR 1828](https://github.com/gradio-app/gradio/pull/1828) we now hide the status loading animation, as well as remove the echo in streaming. Check out the [stream_audio](https://github.com/gradio-app/gradio/blob/main/demo/stream_audio/run.py) demo for more or read through our [Real Time Speech Recognition](https://gradio.app/real_time_speech_recognition/) guide.

<img width="785" alt="Screen Shot 2022-07-19 at 6 02 35 PM" src="https://user-images.githubusercontent.com/9021060/179808136-9e84502c-f9ee-4f30-b5e9-1086f678fe91.png">

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ You might notice that the first inference takes about 20 seconds. This happens s
## Hosting your Gradio demos


[Hugging Face Spaces](hf.co/spaces) allows anyone to host their Gradio demos freely. The community shares oven 2,000 Spaces. Uploading your Gradio demos take a couple of minutes. You can head to [hf.co/new-space](https://huggingface.co/new-space), select the Gradio SDK, create an `app.py` file, and voila! You have a demo you can share with anyone else.
[Hugging Face Spaces](https://hf.co/spaces) allows anyone to host their Gradio demos freely. The community shares oven 2,000 Spaces. Uploading your Gradio demos take a couple of minutes. You can head to [hf.co/new-space](https://huggingface.co/new-space), select the Gradio SDK, create an `app.py` file, and voila! You have a demo you can share with anyone else.

## Building demos based on other demos

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ gr.Interface(

The `examples` parameter takes a list of lists, where each item in the sublists is ordered in the same order that we've listed the `inputs`. So in our case, `[seed, num_punks]`. Give it a try!

You can also try adding a `title`, `description`, and `article` to the `gr.Interface`. Each of those parameters accepts a string, so try it out and see what happens 👀 `article` will also accept HTML, as [explored in a previous guide](./adding_rich_descriptions_to_your_demo)!
You can also try adding a `title`, `description`, and `article` to the `gr.Interface`. Each of those parameters accepts a string, so try it out and see what happens 👀 `article` will also accept HTML, as [explored in a previous guide](https://gradio.app/key_features/#descriptive-content)!
Comment thread
aliabd marked this conversation as resolved.
Outdated

When you're all done, you may end up with something like this:

Expand Down
4 changes: 2 additions & 2 deletions guides/06_other_tutorials/creating_a_new_component.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ The purpose of this guide is to illustrate how to add a new component, which you

## Prerequisites

Make sure you have followed the [CONTRIBUTING.md](../CONTRIBUTING.md) guide in order to setup your local development environment (both client and server side).
Make sure you have followed the [CONTRIBUTING.md](https://github.com/gradio-app/gradio/blob/main/CONTRIBUTING.md) guide in order to setup your local development environment (both client and server side).

## Step 1 - Create a New Python Class and Import it

Expand Down Expand Up @@ -379,7 +379,7 @@ You can take a look at the [demo](https://github.com/gradio-app/gradio/tree/main
To test the application:

- run on a terminal `python path/demo/run.py` which starts the backend at the address [http://localhost:7860](http://localhost:7860);
- in another terminal, from the ui folder, run `pnpm dev` to start the frontend at [localhost:3000](localhost:3000) with hot reload functionalities.
- in another terminal, from the ui folder, run `pnpm dev` to start the frontend at [http://localhost:3000](http://localhost:3000) with hot reload functionalities.

## Conclusion

Expand Down
48 changes: 21 additions & 27 deletions website/homepage/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -3,44 +3,38 @@ server {
server_name localhost;
absolute_redirect off;

#access_log /var/log/nginx/host.access.log main;

location / {
root /usr/share/nginx/html;
try_files $uri $uri/ $uri/index.html =404;
index index.html index.htm;
autoindex on;
}

error_page 404 /404.html;
location /introduction_to_blocks {
return 301 /quickstart;
Comment thread
abidlabs marked this conversation as resolved.
}

location /adding_examples_to_your_app {
Comment thread
abidlabs marked this conversation as resolved.
return 301 /key_features;
}

location /embedding_gradio_demos {
return 301 /sharing_your_app;
}

location /getting_started {
return 301 /quickstart;
}

# redirect server error pages to the static page /50x.html
#
location /guides.html {
return 301 /guides;
}


error_page 404 /404.html;
Comment thread
abidlabs marked this conversation as resolved.
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
#location ~ \.php$ {
# root html;
# fastcgi_pass 127.0.0.1:9000;
# fastcgi_index index.php;
# fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
# include fastcgi_params;
#}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
16 changes: 0 additions & 16 deletions website/homepage/src/guides/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,18 +153,6 @@ def build_guides(output_dir, jinja_env):
category_file = os.path.join(output_folder, "index.html")
with open(category_file, "w") as index_html:
index_html.write(output)
if guide["name"] == "01_quickstart":
output_folder = os.path.join(output_dir, "getting_started")
os.makedirs(output_folder)
index_file = os.path.join(output_folder, "index.html")
with open(index_file, "w") as index_html:
index_html.write(output)
output_folder = os.path.join(output_dir, "quickstart")
os.makedirs(output_folder)
index_file = os.path.join(output_folder, "index.html")
with open(index_file, "w") as index_html:
index_html.write(output)
Comment thread
abidlabs marked this conversation as resolved.


def build_gallery(output_dir, jinja_env):
template = jinja_env.get_template("guides/gallery_template.html")
Expand All @@ -174,10 +162,6 @@ def build_gallery(output_dir, jinja_env):
output_file = os.path.join(output_folder, "index.html")
with open(output_file, "w") as index_html:
index_html.write(output)
output_file = os.path.join(output_dir, "guides.html")
with open(output_file, "w") as index_html:
index_html.write(output)
Comment thread
abidlabs marked this conversation as resolved.


def build(output_dir, jinja_env):
build_guides(output_dir, jinja_env)
Expand Down