updated readme

This commit is contained in:
Ali Abid 2021-02-26 12:32:35 -08:00
parent 3dcfe098b7
commit 3f41e6d35d
2 changed files with 13 additions and 5 deletions

View File

@ -163,14 +163,14 @@ Underneath the output interfaces, there is a button marked "Flag". When a user t
For example, with the calculator interface shown above, we would have the flagged data stored in the flagged directory shown below:
```
```directory
+-- calculator.py
+-- flagged/
| +-- logs.csv
```
*flagged/logs.csv*
```
```csv
num1,operation,num2,Output
5,add,7,12
6,subtract,1.5,4.5
@ -178,7 +178,7 @@ num1,operation,num2,Output
With the sepia interface shown above, we would have the flagged data stored in the flagged directory shown below:
```
```directory
+-- sepia.py
+-- flagged/
| +-- logs.csv
@ -190,8 +190,8 @@ With the sepia interface shown above, we would have the flagged data stored in t
| | +-- 1.png
```
*flagged/logs.csv*:
```
*flagged/logs.csv*
```csv
im,Output
im/0.png,Output/0.png
im/1.png,Output/1.png

View File

@ -88,17 +88,22 @@ Underneath the output interfaces, there is a button marked "Flag". When a user t
For example, with the calculator interface shown above, we would have the flagged data stored in the flagged directory shown below:
```directory
+-- calculator.py
+-- flagged/
| +-- logs.csv
```
*flagged/logs.csv*
```csv
num1,operation,num2,Output
5,add,7,12
6,subtract,1.5,4.5
```
With the sepia interface shown above, we would have the flagged data stored in the flagged directory shown below:
```directory
+-- sepia.py
+-- flagged/
| +-- logs.csv
@ -108,11 +113,14 @@ With the sepia interface shown above, we would have the flagged data stored in t
| +-- Output/
| | +-- 0.png
| | +-- 1.png
```
*flagged/logs.csv*
```csv
im,Output
im/0.png,Output/0.png
im/1.png,Output/1.png
```
You can review these flagged inputs by manually exploring the flagging directory, or load them into the examples of the Gradio interface by pointing the `examples=` argument to the flagged directory. If you wish for the user to provide a reason for flagging, you can pass a list of strings to the `flagging_options` argument of Interface. Users will have to select one of the strings when flagging, which will be saved as an additional column to the CSV.