Comments (3)
I updated the predict function, and it works now:
frame = cv2.imread(input_image) source_face = self.get_face(cv2.imread(swap_image))
from face-swap.
Your repo is fantastic, and I'm very grateful for your sharing. I wanted to ask, which version of Gradio are you using? I encountered some errors while running it.
Use gradio version 3.5..It's works fine 👍 ..Still u face any issues let me know it glad to ans it :)
from face-swap.
Your repo is fantastic, and I'm very grateful for your sharing. I wanted to ask, which version of Gradio are you using? I encountered some errors while running it.
Use gradio version 3.5..It's works fine 👍 ..Still u face any issues let me know it glad to ans it :)
I am using 3.50 also, when I run the code, it comes with this error:
Traceback (most recent call last):
File "/data/xjl/face-swap/app.py", line 76, in <module>
gr.inputs.Image(type="file", label="Target Image"),
File "/home/nvidia/anaconda3/envs/face-swap/lib/python3.10/site-packages/gradio/blocks.py", line 115, in wrapper
return fn(self, **kwargs)
File "/home/nvidia/anaconda3/envs/face-swap/lib/python3.10/site-packages/gradio/inputs.py", line 252, in __init__
super().__init__(
File "/home/nvidia/anaconda3/envs/face-swap/lib/python3.10/site-packages/gradio/components/image.py", line 124, in __init__
raise ValueError(
ValueError: Invalid value for parameter `type`: file. Please choose from one of: ['numpy', 'pil', 'filepath']
Then I update the code as follows:
iface = gr.Interface(
fn=predictor.predict,
inputs=[
gr.inputs.Image(type="filepath", label="Target Image"),
gr.inputs.Image(type="filepath", label="Swap Image")
],
outputs=gr.outputs.Image(type="filepath", label="Result"),
title=title,
examples=[["input.jpg", "swap img.jpg"]])
The program was successfully launched, but when I run it on the gradio, it had this error, there is not output on the page.
'str' object has no attribute 'name'
from face-swap.
Related Issues (1)
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from face-swap.